summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouke Witteveen <j.witteveen@gmail.com>2012-04-30 01:17:56 +0200
committerJouke Witteveen <j.witteveen@gmail.com>2012-04-30 01:17:56 +0200
commit154cbc6c9bc764cc9754a86bcf5e39044d86352e (patch)
tree3b4af31788c2dab34a6aedb17ddef6b96684e4cc
parentf50cf9943caf8355f2534da950227dffed6019a7 (diff)
downloadnetctl-154cbc6c9bc764cc9754a86bcf5e39044d86352e.tar.gz
netctl-154cbc6c9bc764cc9754a86bcf5e39044d86352e.tar.xz
Fix handling of profilenames with spaces (FS#28522)
This was the result of commit b6964 which said to fix FS#17406 by reverting to the subshell-less for-loop that is once again removed in this commit. The real fix to FS#17406 was commit c3276 to the initscripts repository.
-rwxr-xr-xscripts/netcfg-daemon2
-rw-r--r--src/network3
2 files changed, 3 insertions, 2 deletions
diff --git a/scripts/netcfg-daemon b/scripts/netcfg-daemon
index 27bdc18..0291908 100755
--- a/scripts/netcfg-daemon
+++ b/scripts/netcfg-daemon
@@ -44,7 +44,7 @@ case "$1" in
/usr/bin/netcfg down "$profile" || exit $?
fi
else
- /usr/bin/netcfg down "${profile#@}" &
+ /usr/bin/netcfg down "${profile#@}" >/dev/null &
fi
done
rm "$STATE_FILE"
diff --git a/src/network b/src/network
index ce5e962..ebf9ee6 100644
--- a/src/network
+++ b/src/network
@@ -37,7 +37,8 @@ load_profile()
## Take all registered profiles down.
all_down()
{
- for prof in $(find "$STATE_DIR/profiles/" -maxdepth 1 -type f -printf '%f\n'); do
+ find "$STATE_DIR/profiles/" -maxdepth 1 -type f -printf '%f\n' \
+ | while read prof; do
profile_down "$prof"
done
}