merge iw and if commands in alpine/etc/conf.d/hostapd
@@ -4,8 +4,7 @@ CONFIGS="/etc/hostapd/hostapd.conf"
# Extra options to pass to hostapd, see hostapd(8)
OPTIONS=""
-iw wlan0 info > /dev/null 2>&1
-if [ $? -eq 0 ]; then
+if iw wlan0 info > /dev/null 2>&1; then
sed -i '/^driver/s/=.*/=nl80211/' $CONFIGS
else
sed -i '/^driver/s/=.*/=rtl871xdrv/' $CONFIGS
