From: Johannes Berg Date: Wed, 30 Oct 2013 22:14:55 +0000 (+0100) Subject: hwsim tests: Silence modprobe warnings X-Git-Tag: hostap_2_1~716 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=044dd1c2673f25bb7aa20df1eef0b288da0baf12;p=thirdparty%2Fhostap.git hwsim tests: Silence modprobe warnings If module loading isn't enabled (e.g., in VM tests) then don't try to load/unload the modules. Signed-hostap: Johannes Berg --- diff --git a/tests/hwsim/start.sh b/tests/hwsim/start.sh index 1f67002eb..4b425481f 100755 --- a/tests/hwsim/start.sh +++ b/tests/hwsim/start.sh @@ -48,7 +48,7 @@ else fi $DIR/stop-wifi.sh -sudo modprobe mac80211_hwsim radios=5 +test -f /proc/modules && sudo modprobe mac80211_hwsim radios=5 if [ "$CONCURRENT" = "y" ]; then sudo iw wlan0 interface add sta0 type station sudo iw wlan1 interface add sta1 type station diff --git a/tests/hwsim/stop-wifi.sh b/tests/hwsim/stop-wifi.sh index eaa9d4e3b..d578b5bf2 100755 --- a/tests/hwsim/stop-wifi.sh +++ b/tests/hwsim/stop-wifi.sh @@ -67,7 +67,7 @@ for i in /tmp/wpas-wlan0 /tmp/wpas-wlan1 /tmp/wpas-wlan2 /var/run/hostapd-global fi done -if grep -q mac80211_hwsim /proc/modules ; then +if grep -q mac80211_hwsim /proc/modules 2>/dev/null ; then sudo rmmod mac80211_hwsim sudo rmmod mac80211 sudo rmmod cfg80211