diff options
author | Christian Heim <phreak@gentoo.org> | 2006-03-09 10:07:19 +0000 |
---|---|---|
committer | Christian Heim <phreak@gentoo.org> | 2006-03-09 10:07:19 +0000 |
commit | f066e899210534cedced47c0c9076fe7c90a6693 (patch) | |
tree | 5ce0ac5c40ad8aeb5a67ec336bb78c750b986828 /net-scripts | |
parent | Fixing the indentation of the Changelog entries (diff) | |
download | baselayout-vserver-f066e899210534cedced47c0c9076fe7c90a6693.tar.gz baselayout-vserver-f066e899210534cedced47c0c9076fe7c90a6693.tar.bz2 baselayout-vserver-f066e899210534cedced47c0c9076fe7c90a6693.zip |
Merging r1939
svn path=/baselayout-vserver/trunk/; revision=276
Diffstat (limited to 'net-scripts')
-rwxr-xr-x | net-scripts/init.d/net.lo | 4 | ||||
-rw-r--r-- | net-scripts/net.modules.d/iwconfig | 16 |
2 files changed, 15 insertions, 5 deletions
diff --git a/net-scripts/init.d/net.lo b/net-scripts/init.d/net.lo index 332834b..028f8c7 100755 --- a/net-scripts/init.d/net.lo +++ b/net-scripts/init.d/net.lo @@ -16,7 +16,7 @@ depend() { # Load any custom depend functions for the given interface # For example, br0 may need eth0 and eth1 - local iface="${myservice#*.}" + local iface="${SVCNAME#*.}" [[ $(type -t "depend_${iface}") == "function" ]] && depend_${iface} return 0 @@ -953,6 +953,7 @@ link_file() { # Start entry point so that we only have one function # which localises variables and unsets functions start() { + declare -r IFACE="${SVCNAME#*.}" if [[ ${IN_HOTPLUG} == "1" ]] ; then # If we've been called by hotplug, check if we have # a policy for the interface for not starting @@ -988,6 +989,7 @@ start() { # Stop entry point so that we only have one function # which localises variables and unsets functions stop() { + declare -r IFACE="${SVCNAME#*.}" einfo "Stopping ${IFACE}" run "${IFACE}" stop } diff --git a/net-scripts/net.modules.d/iwconfig b/net-scripts/net.modules.d/iwconfig index 9d079c2..34082d4 100644 --- a/net-scripts/net.modules.d/iwconfig +++ b/net-scripts/net.modules.d/iwconfig @@ -335,8 +335,6 @@ iwconfig_associate() { eerror "Unable to change mode to ${mode}" return 1 fi - interface_down "${iface}" - interface_up "${iface}" if [[ ${ESSID} == "any" ]]; then iwconfig "${iface}" ap any 2>/dev/null @@ -371,7 +369,7 @@ iwconfig_associate() { fi # Finally apply the user Config - #iwconfig_user_config "${iface}" "${ESSIDVAR}" + iwconfig_user_config "${iface}" "${ESSIDVAR}" vebegin "Connecting to \"${dessid}\" ${w}" @@ -690,8 +688,13 @@ iwconfig_defaults() { iwconfig "${iface}" txpower auto &>/dev/null iwconfig "${iface}" key [1] off &>/dev/null iwconfig "${iface}" mode managed &>/dev/null - iwconfig "${iface}" essid -- off &>/dev/null iwconfig "${iface}" ap off &>/dev/null + + # According to the iwconfig man page we should be doing + # iwconfig "${iface}" essid -- off &>/dev/null + # instead. However, this borks many drivers - setting essid + # to "" seems to work for all drivers however. + iwconfig "${iface}" essid "" &>/dev/null } # void iwconfig_strip_associated(char *iface) @@ -909,4 +912,9 @@ iwconfig_pre_start() { return 1 } +iwconfig_post_stop() { + interface_exists "${iface}" || return 0 + iwconfig_defaults "${iface}" +} + # vim:ts=4 |