summaryrefslogtreecommitdiff
path: root/source/n/NetworkManager/rc.networkmanager
diff options
context:
space:
mode:
Diffstat (limited to 'source/n/NetworkManager/rc.networkmanager')
-rw-r--r--source/n/NetworkManager/rc.networkmanager8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/n/NetworkManager/rc.networkmanager b/source/n/NetworkManager/rc.networkmanager
index 430e61a4..dbdf19d5 100644
--- a/source/n/NetworkManager/rc.networkmanager
+++ b/source/n/NetworkManager/rc.networkmanager
@@ -69,6 +69,14 @@ nm_stop()
sleep 3
rm -f $PIDFILE &>/dev/null
fi
+ # If wpa_supplicant is running here, it needs to be shut down as well.
+ # Since you're asking for NetworkManager to shut down, we have to assume
+ # that wpa_supplicant was started by it.
+ if [ -r /var/run/wpa_supplicant.pid ]; then
+ kill $(cat /var/run/wpa_supplicant.pid)
+ elif [ -r /run/wpa_supplicant.pid ]; then
+ kill $(cat /run/wpa_supplicant.pid)
+ fi
echo "stopped";
sleep 3
}