diff options
author | Rémy Oudompheng <remy@archlinux.org> | 2011-08-07 00:35:30 +0200 |
---|---|---|
committer | Rémy Oudompheng <remy@archlinux.org> | 2011-08-07 00:35:30 +0200 |
commit | 9797f90b529d80062f19a830aafa4e4a5e8d79cf (patch) | |
tree | 32737a068639f842f911a3b360bf734765873442 | |
parent | 124580abf297b9b6ce1a7558feee1e38d68fe9d9 (diff) | |
download | netctl-9797f90b529d80062f19a830aafa4e4a5e8d79cf.tar.gz netctl-9797f90b529d80062f19a830aafa4e4a5e8d79cf.tar.xz |
Better quoting of $profile
Signed-off-by: Rémy Oudompheng <remy@archlinux.org>
-rw-r--r-- | src/network | 2 | ||||
-rwxr-xr-x | wpa_actiond/netcfg-wpa_actiond | 10 |
2 files changed, 8 insertions, 4 deletions
diff --git a/src/network b/src/network index 195c480..e55647c 100644 --- a/src/network +++ b/src/network @@ -333,7 +333,7 @@ set_iface() { local PROFILE="$3" [[ -z "$PROFILE" ]] && PROFILE=external if [[ "$1" == "up" ]]; then - echo "PROFILE=$PROFILE" > "$STATE_DIR/interfaces/$2" + echo "PROFILE='$PROFILE'" > "$STATE_DIR/interfaces/$2" elif [[ "$1" == "down" ]]; then rm -f "$STATE_DIR/interfaces/$2" # JP: add -f so we don't complain if the interface isn't up fi diff --git a/wpa_actiond/netcfg-wpa_actiond b/wpa_actiond/netcfg-wpa_actiond index 3bbb9fc..9ad319f 100755 --- a/wpa_actiond/netcfg-wpa_actiond +++ b/wpa_actiond/netcfg-wpa_actiond @@ -51,10 +51,14 @@ fi WPA_CONF="$(make_wpa_config_file $interface)" -for profile in ${AUTO_PROFILES:-$(list_profiles)}; do - echo $profile +if [[ -n "${AUTO_PROFILES}" ]]; then + for prof in ${AUTO_PROFILES}; do echo $prof; done +else + list_profiles +fi | while read profile; do + echo "$profile" ( - load_profile $profile + load_profile "$profile" [[ $CONNECTION != "wireless" ]] && exit 1 [[ $INTERFACE != $interface ]] && exit 1 |