diff options
author | Rémy Oudompheng <remy@archlinux.org> | 2011-06-19 21:46:47 +0200 |
---|---|---|
committer | Rémy Oudompheng <remy@archlinux.org> | 2011-06-19 21:46:47 +0200 |
commit | 5ac9b45fe392a70c7325aac65ff02f572cdf1cff (patch) | |
tree | faba08a0b514d1668acfb6995d9887a7eda62886 /contrib | |
parent | 43926c44661a9f8499b3fb9775e1cfdd4aef2bdf (diff) | |
download | netctl-5ac9b45fe392a70c7325aac65ff02f572cdf1cff.tar.gz netctl-5ac9b45fe392a70c7325aac65ff02f572cdf1cff.tar.xz |
Add /etc/conf.d/netcfg for net-auto-wireless configuration.
Signed-off-by: Rémy Oudompheng <remy@archlinux.org>
Diffstat (limited to 'contrib')
-rwxr-xr-x | contrib/pm-utils.handler | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/contrib/pm-utils.handler b/contrib/pm-utils.handler index b8cb568..0ad87b3 100755 --- a/contrib/pm-utils.handler +++ b/contrib/pm-utils.handler @@ -4,6 +4,10 @@ [[ -f /usr/lib/network/network ]] || exit $NA . /usr/lib/network/network +. /etc/rc.conf +. /etc/conf.d/netcfg + +WIRELESS_INTERFACE=${WIRELESS_INTERFACE:-wlan0} auto_resume() { @@ -32,23 +36,23 @@ case "$1" in fi ;; thaw|resume) - if [ -f "$STATE_DIR/interface/wlan0" ]; then + if [ -f "$STATE_DIR/interface/${WIRELESS_INTERFACE}" ]; then report_notify "resuming all interfaces..." - auto_resume wlan0 + auto_resume ${WIRELESS_INTERFACE} else report_notify "resuming all interfaces except wireless..." - all_resume wlan0 + all_resume ${WIRELESS_INTERFACE} fi ;; radio_off) report_notify "suspending wireless interface..." - interface_suspend wlan0 no - set_iface disabled wlan0 - bring_interface forcedown wlan0 + interface_suspend ${WIRELESS_INTERFACE} no + set_iface disabled ${WIRELESS_INTERFACE} + bring_interface forcedown ${WIRELESS_INTERFACE} ;; radio_on) report_notify "resuming wireless interface..." - auto_resume wlan0 + auto_resume ${WIRELESS_INTERFACE} if [ -x /etc/pm/power.d/??wifi ]; then /usr/bin/on_ac_power # this is in pm-utils case $? in |