--- /dev/null
+diff -urN rc-scripts-0.3.1.org/rc.d/init.d/functions.network rc-scripts-0.3.1/rc.d/init.d/functions.network
+--- rc-scripts-0.3.1.org/rc.d/init.d/functions.network Wed Aug 7 19:51:25 2002
++++ rc-scripts-0.3.1/rc.d/init.d/functions.network Wed Aug 7 20:06:10 2002
+@@ -361,6 +361,13 @@
+ fi
+ }
+
++is_wireless_device () {
++ if [ -x /sbin/iwconfig ]; then
++ LC_ALL=C iwconfig "${1}" 2>&1 | grep -q "no wireless extensions" || return 0
++ fi
++ return 1
++}
++
+ #
+ # following function sets up routes not associated to any device
+ # eg. unreachable or blackhole routes
+diff -urN rc-scripts-0.3.1.org/sysconfig/network-scripts/ifup rc-scripts-0.3.1/sysconfig/network-scripts/ifup
+--- rc-scripts-0.3.1.org/sysconfig/network-scripts/ifup Wed Aug 7 19:51:25 2002
++++ rc-scripts-0.3.1/sysconfig/network-scripts/ifup Wed Aug 7 19:53:10 2002
+@@ -104,6 +104,42 @@
+ if is_yes "${IPV6_NETWORKING}" && is_yes "${IPV6_DISABLE_AUTOCONF}"; then
+ run_cmd "Disabling IPv6 autoconfiguration" sysctl -w net.ipv6.conf.${DEVICE}=0
+ fi
++
++if is_wireless_device "${DEVICE}"; then
++ [ -z "${WLAN_NICKNAME}" ] && WLAN_NICKNAME="$(hostname -f)"
++
++ # wlan mode needs to be first
++ [ -n "${WLAN_MODE}" ] && iwconfig ${DEVICE} mode ${WLAN_MODE}
++ iwconfig ${DEVICE} nickname ${WLAN_NICKNAME}
++ [ -n "${WLAN_ESSID}" ] && iwconfig ${DEVICE} essid ${WLAN_ESSID}
++ [ -n "${WLAN_NWID}" ] && iwconfig ${DEVICE} nwid ${WLAN_NWID}
++ if [ -n "${WLAN_FREQ}" -a "${WLAN_MODE}" != "Managed" ] ; then
++ iwconfig ${DEVICE} freq ${WLAN_FREQ}
++ elif [ -n "${WLAN_CHANNEL}" -a "${WLAN_MODE}" != "Managed" ]; then
++ iwconfig ${DEVICE} channel ${WLAN_CHANNEL}
++ fi
++ [ -n "${WLAN_SENS}" ] && iwconfig ${DEVICE} sens ${WLAN_SENS}
++ [ -n "${WLAN_AP}" ] && iwconfig ${DEVICE} ap ${WLAN_AP}
++ [ -n "${WLAN_BITRATE}" ] && iwconfig ${DEVICE} rate ${WLAN_BITRATE}
++ [ -n "${WLAN_RTS_THRESHOLD}" ] && iwconfig ${DEVICE} rts ${WLAN_RTS_THRESHOLD}
++ [ -n "${WLAN_FRAGMENTATION_THRESHOLD}" ] && iwconfig ${DEVICE} frag ${WLAN_FRAGMENTATION_THRESHOLD}
++ if [ -n "${WLAN_KEY}" ]; then
++ iwconfig ${DEVICE} key ${WLAN_KEY}
++ [ -n "${WLAN_ENCRYPTION}" ] && iwconfig ${DEVICE} key ${WLAN_ENCRYPTION}
++ fi
++ if is_no "${WLAN_ENCRYPTION}"; then
++ iwconfig ${DEVICE} key off
++ fi
++ [ -n "${WLAN_POWER}" ] && iwconfig ${DEVICE} ${WLAN_POWER}
++ [ -n "${WLAN_TXPOWER}" ] && iwconfig ${DEVICE} ${WLAN_TXPOWER}
++ [ -n "${WLAN_RETRY}" ] && iwconfig ${DEVICE} ${WLAN_RETRY}
++ if is_yes "${WLAN_COMMIT}"; then
++ iwconfig ${DEVICE} commit
++ fi
++ [ -n "${WLAN_NWID}" ] && iwconfig ${DEVICE} nwid ${WLAN_NWID}
++ # essid should be last due to netowork rescanning by wlan devices
++ [ -n "${WLAN_ESSID}" ] && iwconfig ${DEVICE} essid ${WLAN_ESSID}
++fi
+
+ if [ "$HANDLING" = "2" ]; then
+ exit 0
-# $Id: rc-scripts.spec,v 1.96 2002-07-30 14:06:10 qboosh Exp $
+# $Id: rc-scripts.spec,v 1.97 2002-08-07 20:48:58 misiek Exp $
Summary: inittab and /etc/rc.d scripts
Summary(de): inittab und /etc/rc.d Scripts
Summary(fr): inittab et scripts /etc/rc.d
Summary(tr): inittab ve /etc/rc.d dosyalarý
Name: rc-scripts
Version: 0.3.1
-Release: 5
+Release: 6
License: GPL
Vendor: PLD rc-scripts Team <pld-rc-scripts@pld.org.pl>
Group: Base
Patch1: %{name}-ipx_fix.patch
Patch2: %{name}-ulimitc.patch
Patch3: %{name}-killgnu.patch
+Patch4: %{name}-wlan.patch
URL: http://cvs.pld.org.pl/index.cgi/rc-scripts/
BuildRequires: autoconf
BuildRequires: automake
%patch1 -p1
%patch2 -p1
%patch3 -p1
+%patch4 -p1
%build
aclocal