ifup-br - załącznik

Radosław Kintzi radek w pop.e-wro.pl
Wto, 4 Lis 2003, 15:00:49 CET


-- 
Radosław Kintzi
mailto:radzio w pld-linux.org
gg:2199600
-------------- następna część ---------
Index: ifup-br
===================================================================
RCS file: /cvsroot/rc-scripts/sysconfig/network-scripts/ifup-br,v
retrieving revision 1.4
diff -a -u -r1.4 ifup-br
--- ifup-br	11 May 2002 09:50:53 -0000	1.4
+++ ifup-br	4 Nov 2003 13:35:14 -0000
@@ -82,5 +82,62 @@
 	exit 1
 fi
 
+for device in $BRIDGE_DEVS; do
+	if is_wireless_device "${device}"; then
+	    if [ -z "${device}_${WLAN_NICKNAME}" ]; then
+		 WLAN_NICKNAME="$(hostname -f)"
+	     elif
+		 WLAN_NICKANME=${device}_${WLAN_NICKNAME}
+	     fi
+
+	    # wlan mode needs to be first
+	    [ -n "${device}_${WLAN_MODE}" ] && iwconfig ${device} \
+	   	 mode ${device}_${WLAN_MODE}
+	    iwconfig ${device} nickname ${WLAN_NICKNAME}
+	    [ -n "${device}_${WLAN_ESSID}" ] && iwconfig ${device} \
+	   	 essid ${device}_${WLAN_ESSID}
+	    [ -n "${device}_${WLAN_NWID}" ] && iwconfig ${device} \
+	    	nwid ${device}_${WLAN_NWID}
+	    if [ -n "${device}_${WLAN_FREQ}" -a "${device}_${WLAN_MODE}" != "Managed" ] ; then
+		iwconfig ${device} freq ${device}_${WLAN_FREQ}
+	    elif [ -n "${device}_${WLAN_CHANNEL}" -a "${device}_${WLAN_MODE}" != "Managed" ]; then
+		iwconfig ${device} channel ${device}_${WLAN_CHANNEL}
+	    fi
+	    [ -n "${device}_${WLAN_SENS}" ] && iwconfig ${device} \
+	    	sens ${device}_${WLAN_SENS}
+	    [ -n "${device}_${WLAN_AP}" ] && iwconfig ${device} \
+	    	ap ${device}_${WLAN_AP}
+	    [ -n "${device}_${WLAN_BITRATE}" ] && iwconfig ${device} \
+	    	rate ${device}_${WLAN_BITRATE}
+	    [ -n "${device}_${WLAN_RTS_THRESHOLD}" ] && iwconfig ${device} \
+	    	rts ${device}_${WLAN_RTS_THRESHOLD}
+	    [ -n "${device}_${WLAN_FRAGMENTATION_THRESHOLD}" ] && iwconfig \
+	    	${device} frag ${device}_${WLAN_FRAGMENTATION_THRESHOLD}
+	    if [ -n "${device}_${WLAN_KEY}" ]; then
+		iwconfig ${device} key ${device}_${WLAN_KEY}
+		[ -n "${device}_${WLAN_ENCRYPTION}" ] && iwconfig ${device} \
+			key ${device}_${WLAN_ENCRYPTION}
+	    fi
+	    if is_no "${device}_${WLAN_ENCRYPTION}"; then
+		iwconfig ${device} key off
+	    fi
+	    [ -n "${device}_${WLAN_POWER}" ] && \
+	    	iwconfig ${device} ${device}_${WLAN_POWER}
+	    [ -n "${device}_${WLAN_TXPOWER}" ] && \
+	    	iwconfig ${device} ${device}_${WLAN_TXPOWER}
+	    [ -n "${device}_${WLAN_RETRY}" ] && \
+	    	iwconfig ${device} ${device}_${WLAN_RETRY}
+	    if is_yes "${device}_${WLAN_COMMIT}"; then
+		iwconfig ${device} commit
+	    fi
+	    [ -n "${device}_${WLAN_NWID}" ] && iwconfig ${device} \
+	    	nwid ${device}_${WLAN_NWID}
+		
+	    # essid should be last due to netowork rescanning by wlan devices
+	    [ -n "${device}_${WLAN_ESSID}" ] && iwconfig ${device} \
+	    	essid ${device}_${WLAN_ESSID}
+	fi
+done
+
 # This must be last line !
 # vi:syntax=sh:tw=78:ts=8:sw=4


Więcej informacji o liście dyskusyjnej pld-devel-pl