Wait a bit longer for wpa_supplicant/hostapd to exit and clear control
interface files separately if either any of the cleanup steps fail to do
so.
Signed-hostap: Jouni Malinen <j@w1.fi>
#!/bin/sh
-if pidof wpa_supplicant hostapd > /dev/null; then
+if pidof wpa_supplicant hostapd valgrind.bin > /dev/null; then
RUNNING=yes
else
RUNNING=no
if [ "$RUNNING" = "yes" ]; then
# give some time for hostapd and wpa_supplicant to complete deinit
- sleep 2
+ sleep 4
fi
if pidof wpa_supplicant hostapd > /dev/null; then
fi
done
+for i in /tmp/wpas-wlan0 /tmp/wpas-wlan1 /tmp/wpas-wlan2 /var/run/hostapd-global; do
+ if [ -e $i ]; then
+ sleep 1
+ if [ -e $i ]; then
+ echo "Control interface file $i exists - remove it"
+ sudo rm $i
+ fi
+ fi
+done
+
if grep -q mac80211_hwsim /proc/modules ; then
sudo rmmod mac80211_hwsim
# wait at the end to avoid issues starting something new immediately after