diff options
author | James Rayner <james@archlinux.org> | 2008-12-18 07:37:46 +0100 |
---|---|---|
committer | James Rayner <james@archlinux.org> | 2008-12-18 07:37:46 +0100 |
commit | 5c2dc23703f1261b5b6eb0fd9906a2975e1c37ea (patch) | |
tree | a4e3ebcd2d40d824a8cabadda46c231704f6ac90 /src/connections/wireless | |
parent | 41197e24cfe9d2bf040d411e6c438aff516d943f (diff) | |
download | netctl-5c2dc23703f1261b5b6eb0fd9906a2975e1c37ea.tar.gz netctl-5c2dc23703f1261b5b6eb0fd9906a2975e1c37ea.tar.xz |
use arguments to scripts rather than sourcing in connection functions
Diffstat (limited to 'src/connections/wireless')
-rw-r--r-- | src/connections/wireless | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/connections/wireless b/src/connections/wireless index bdf458a..04c5819 100644 --- a/src/connections/wireless +++ b/src/connections/wireless @@ -1,4 +1,5 @@ #! /bin/bash +. /usr/lib/network/network wireless_up() { @@ -97,23 +98,23 @@ wireless_up() { ;; esac - . $CONN_DIR/ethernet - if ! ethernet_up $1; then + if ! ${CONN_DIR}/ethernet up $1; then wireless_down $1 YES return 1 fi } wireless_down() { + load_profile $1 PROFILE=$1 NOETHERNETDOWN=$2 if ! checkyesno $2; then - . $CONN_DIR/ethernet - ethernet_down $1 - fi + ${CONN_DIR}/ethernet down $1 + fi wpa_cli terminate &> /dev/null [[ "$SECURITY" == "wpa" ]] && rm -f "/tmp/wpa.${1// /}" # remove wpa config iwconfig $INTERFACE essid off key off &> /dev/null - } +wireless_$1 $2 +exit $? # vim: set ts=4 et sw=4: |