summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndrea Scarpino <andrea@archlinux.org>2009-05-19 18:50:32 +0200
committerAndrea Scarpino <andrea@archlinux.org>2009-05-19 18:50:32 +0200
commit2878a5d7725e7f80e1b5a404f2df7416c80c43f3 (patch)
tree3e05d6a1631d209b96921a4b40ab92a1543e10d5 /src
parent40ba706d25128781dc0f4a54303e056abf5d1c3c (diff)
downloadnetctl-2878a5d7725e7f80e1b5a404f2df7416c80c43f3.tar.gz
netctl-2878a5d7725e7f80e1b5a404f2df7416c80c43f3.tar.xz
fix #14761
Diffstat (limited to 'src')
-rw-r--r--src/network28
1 files changed, 13 insertions, 15 deletions
diff --git a/src/network b/src/network
index 6a46e02..f2fc415 100644
--- a/src/network
+++ b/src/network
@@ -13,7 +13,7 @@ err_append() {
}
err() {
- printhl "$*"
+ printhl "$*"
}
### Profile loading
@@ -52,7 +52,6 @@ validate_profile()
all_down()
{
for prof in "$(find ${STATE_DIR}/profiles/ -maxdepth 1 -type f -printf '%f\n')"; do
-
profile_down $prof
done
}
@@ -65,7 +64,7 @@ all_suspend()
[[ ! -d $STATE_DIR ]] && mkdir -p $STATE_DIR/{interfaces,profiles}
[[ ! -d $STATE_DIR/suspend ]] && mkdir $STATE_DIR/suspend
- for $prof in find "$STATE_DIR/profiles/" -maxdepth 1 -type f; do
+ for prof in find "$STATE_DIR/profiles/" -maxdepth 1 -type f; do
cp $STATE_DIR/profiles/$prof $STATE_DIR/suspend/
profile_down $prof
done
@@ -76,7 +75,7 @@ all_suspend()
#
all_resume()
{
- for $prof in find "$STATE_DIR/suspend/" -maxdepth 1 -type f; do
+ for prof in find "$STATE_DIR/suspend/" -maxdepth 1 -type f; do
profile_up $prof
rm $STATE_DIR/suspend/$prof
done
@@ -113,7 +112,6 @@ profile_up()
load_profile $1
fi
fi
-
eval $PRE_UP || exit 1
@@ -170,19 +168,19 @@ profile_down()
# Check if variable is a member of an array
inarray()
{
-search=$1
-shift
-for item in $*; do
- if [[ "$item" == "$search" ]]; then
- return 0
- fi
-done
-return 1
+ search=$1
+ shift
+ for item in $*; do
+ if [[ "$item" == "$search" ]]; then
+ return 0
+ fi
+ done
+ return 1
}
quirk() {
-inarray $1 ${QUIRKS[@]}
-return $?
+ inarray $1 ${QUIRKS[@]}
+ return $?
}
# interface_down interface