--- trunk/magellan-initscripts/etc/rc.d/init.d/network 2005/10/11 11:19:58 270 +++ trunk/magellan-initscripts/etc/rc.d/init.d/network 2005/10/21 15:24:25 275 @@ -1,5 +1,5 @@ #!/bin/bash -# $Header: /home/cvsd/magellan-cvs/magellan-src/magellan-initscripts/etc/rc.d/init.d/network,v 1.10 2005-10-11 11:19:58 niro Exp $ +# $Header: /home/cvsd/magellan-cvs/magellan-src/magellan-initscripts/etc/rc.d/init.d/network,v 1.11 2005-10-21 15:24:25 niro Exp $ #%rlevels: 0:k 1:k 2:k 3:s 4:s 5:s 6:k #%start: 20 @@ -196,6 +196,9 @@ ${WIRELESS_WPA_CONFIG} fi + # remove old state dir + [ -d /var/run/wpa_supplicant ] && rm -rf /var/run/wpa_supplicant + # now run the wpa_supplicant dameon wpa_supplicant -B \ -D"${WIRELESS_WPA_DRIVER}" \ @@ -218,7 +221,16 @@ return 1 fi - echo -e ${COLOREDSTAR}"Setting up wlan-ext for ${COLBLUE}${iface}${COLDEFAULT} ... " + if [[ -n ${WIRELESS_BITRATE} ]] || + [[ -n ${WIRELESS_CHANNEL} ]] || + [[ -n ${WIRELESS_ESSID} ]] || + [[ -n ${WIRELESS_FREQUENCY} ]] || + [[ -n ${WIRELESS_MODE} ]] || + [[ -n ${WIRELESS_NICK} ]] || + [[ -n ${WIRELESS_AUTH_MODE} ]] + then + echo -e ${COLOREDSTAR}"Setting up wlan-ext for ${COLBLUE}${iface}${COLDEFAULT} ... " + fi [[ -n ${WIRELESS_BITRATE} ]] && iwconfig "${iface}" rate "${WIRELESS_BITRATE}" [[ -n ${WIRELESS_CHANNEL} ]] && iwconfig "${iface}" channel "${WIRELESS_CHANNEL}" @@ -267,7 +279,7 @@ ${CURS_UP} ${SET_WWCOL} echo "[DHCP]" - loadproc ${DHCP_PROG} ${DHCP_START} + loadproc ${DHCP_PROG} ${DHCP_START} "${iface}" ;; static|STATIC) ${CURS_UP} @@ -337,7 +349,7 @@ killall wpa_supplicant fi done - + # remove state dir if [ -d /var/run/wpa_supplicant ] then