1
0
Fork 0
mirror of https://github.com/albfan/miraclecast.git synced 2025-02-14 19:02:07 +00:00

add debian support to miracle-utils.sh and normal-wifi.sh

This commit is contained in:
Derek Dai 2016-08-15 11:15:12 +08:00
parent 70ffd2d532
commit 7fc8d0884c
3 changed files with 10 additions and 4 deletions

View file

@ -103,7 +103,7 @@ If you feel confidence enough (since systemd is the entrypoint for an OS) extrac
Steps to use it as sink:
1. shutdown wpa_supplicant
1. shutdown wpa_supplicant and NetworkManager
$ sudo kill -9 $(ps -ef | grep wpa_supplican[t] | awk '{print $2}')
# now you can use `res/kill-wpa.sh`

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