]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - src/initscripts/init.d/wlanclient
Add wireless client for RED to startup process.
[ipfire-2.x.git] / src / initscripts / init.d / wlanclient
index 80be8f987c18b4f2eefc1e8055db13d3e8e3302a..ee24c43a19a68e52cedf4ad652f46d1ffe8e9255 100755 (executable)
@@ -240,8 +240,15 @@ function wpa_supplicant_stop() {
        boot_mesg "Stopping wireless event handler on ${RED_DEV}..."
        killproc wpa_cli
 
        boot_mesg "Stopping wireless event handler on ${RED_DEV}..."
        killproc wpa_cli
 
+       # wpa_cli does not send a disconnect event when get stopped.
+       # So we manually have to send it to the wpa_supplicant.exe.
+       /etc/rc.d/init.d/networking/wpa_supplicant.exe "${RED_DEV}" DISCONNECTED
+
        boot_mesg "Stopping wireless client on ${RED_DEV}..."
        killproc wpa_supplicant
        boot_mesg "Stopping wireless client on ${RED_DEV}..."
        killproc wpa_supplicant
+       
+       # Tidy up /tmp directory.
+       rm -f /tmp/wpa_ctrl_*
 }
 
 case "${1}" in
 }
 
 case "${1}" in