+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