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/ethernet | |
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/ethernet')
-rw-r--r-- | src/connections/ethernet | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/connections/ethernet b/src/connections/ethernet index 75976da..68561a8 100644 --- a/src/connections/ethernet +++ b/src/connections/ethernet @@ -1,7 +1,9 @@ #! /bin/bash - +. /usr/lib/network/network ethernet_up() { + load_profile $1 + if [[ ! -e /sys/class/net/$INTERFACE ]]; then if ! echo "$INTERFACE"|grep ":"; then err_append "Interface $INTERFACE does not exist" @@ -97,6 +99,7 @@ ethernet_up() { } ethernet_down() { + load_profile $1 case $IP in dhcp) if checkyesno $DHCLIENT; then @@ -119,4 +122,6 @@ ethernet_down() { } +ethernet_$1 $2 +exit $? # vim: set ts=4 et sw=4: |