1
0
Fork 0
mirror of https://github.com/albfan/miraclecast.git synced 2025-03-09 23:38:56 +00:00

Merge pull request #105 from derekdai/master

Add debian support to kill-wpa.sh and find wpa_supplicant throught PATH
This commit is contained in:
Alberto Fanjul 2016-08-18 12:09:31 +02:00 committed by GitHub
commit 866f90f92a
6 changed files with 59 additions and 19 deletions

View file

@ -113,12 +113,18 @@ function check_archlinux_distro {
function check_ubuntu_distro {
cat /proc/version | grep -i ubuntu
}
#
# checking if distro is debian
#
function check_debian_distro {
cat /proc/version | grep -i debian
}
#
# ubuntu manager restarts automatically wpa_supplicant
#
function kill_ubuntu_network_manager {
if check_ubuntu_distro
if check_ubuntu_distro || check_debian_distro
then
echo stopping NetworkManager
sudo service NetworkManager stop
@ -140,7 +146,7 @@ function kill_archlinux_network_manager {
# start ubuntu manager
#
function start_ubuntu_network_manager {
if check_ubuntu_distro
if check_ubuntu_distro || check_debian_distro
then
echo starting NetworkManager
sudo service NetworkManager start

View file

@ -47,7 +47,7 @@ CONFIG_FILE=${1:-/run/network/wpa_supplicant_${ETHERNAME}.conf}
echo starting wpa_supplicant for normal connection
if check_ubuntu_distro
if check_ubuntu_distro || check_debian_distro
then
start_ubuntu_network_manager
sudo wpa_supplicant -B -u -s -O /var/run/wpa_supplicant