summaryrefslogtreecommitdiffstats
path: root/wpa_actiond
diff options
context:
space:
mode:
authorThomas Bächler <thomas@archlinux.org>2009-09-29 09:53:36 +0200
committerThomas Bächler <thomas@archlinux.org>2009-09-29 09:53:36 +0200
commit57154bd0ee7056e29d4ebe4df12b477d016c95a5 (patch)
tree9a770618c3865b18283a88311210c1a596bc709e /wpa_actiond
parentddfe9dab9710e9894c32c00ca573e1991dd426fa (diff)
downloadnetctl-57154bd0ee7056e29d4ebe4df12b477d016c95a5.tar.gz
netctl-57154bd0ee7056e29d4ebe4df12b477d016c95a5.tar.xz
wpa_actiond-action: Properly quote arguments of the script, they might contain spaces (especially $profile)
Diffstat (limited to 'wpa_actiond')
-rwxr-xr-xwpa_actiond/netcfg-wpa_actiond-action14
1 files changed, 7 insertions, 7 deletions
diff --git a/wpa_actiond/netcfg-wpa_actiond-action b/wpa_actiond/netcfg-wpa_actiond-action
index f273b3b..3547fef 100755
--- a/wpa_actiond/netcfg-wpa_actiond-action
+++ b/wpa_actiond/netcfg-wpa_actiond-action
@@ -1,17 +1,17 @@
#! /bin/bash
-interface=$1
-ssid=$2
-profile=$3
-action=$4
+interface="$1"
+ssid="$2"
+profile="$3"
+action="$4"
. /usr/lib/network/network
-[[ $profile ]] && load_profile "$profile"
+[[ "$profile" ]] && load_profile "$profile"
case $action in
CONNECT)
if [[ -z $profile ]]; then
- dhcpcd $interface
+ dhcpcd "$interface"
exit $?
fi
if ! $CONN_DIR/ethernet up "$profile"; then
@@ -28,7 +28,7 @@ case $action in
;;
DISCONNECT)
if [[ -z $profile ]]; then
- dhcpcd -k $interface
+ dhcpcd -k "$interface"
exit $?
fi
if ! ( eval $PRE_DOWN ); then # JP: sandbox the eval