From 6e3eeba4a81397281a33f5c8c2fa32ac92204667 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Wed, 7 Aug 2002 20:48:58 +0000 Subject: [PATCH] - wlan support from cvs Changed files: rc-scripts-wlan.patch -> 1.1 rc-scripts.spec -> 1.97 --- rc-scripts-wlan.patch | 63 +++++++++++++++++++++++++++++++++++++++++++ rc-scripts.spec | 6 +++-- 2 files changed, 67 insertions(+), 2 deletions(-) create mode 100644 rc-scripts-wlan.patch diff --git a/rc-scripts-wlan.patch b/rc-scripts-wlan.patch new file mode 100644 index 0000000..e5ef19a --- /dev/null +++ b/rc-scripts-wlan.patch @@ -0,0 +1,63 @@ +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 diff --git a/rc-scripts.spec b/rc-scripts.spec index 10dc4cb..0db30bd 100644 --- a/rc-scripts.spec +++ b/rc-scripts.spec @@ -1,4 +1,4 @@ -# $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 @@ -6,7 +6,7 @@ Summary(pl): inittab i skrypty startowe z katalogu /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 Group: Base @@ -15,6 +15,7 @@ Patch0: %{name}-shared.patch 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 @@ -88,6 +89,7 @@ programc %patch1 -p1 %patch2 -p1 %patch3 -p1 +%patch4 -p1 %build aclocal -- 2.44.0