summaryrefslogtreecommitdiffstats
path: root/src/net-profiles
diff options
context:
space:
mode:
authorJim Pryor <profjim@jimpryor.net>2009-08-26 02:18:49 +0200
committerJames Rayner <james@archlinux.org>2009-09-07 12:15:56 +0200
commit812fdb207b88d7f0bfd022641873d00b66d9071b (patch)
treee5f5a5cc13a5b2024a778db648514a1628c3a9e9 /src/net-profiles
parenta752c3984aaf41c0b6846f8cb1be7af2a62ece22 (diff)
downloadnetctl-812fdb207b88d7f0bfd022641873d00b66d9071b.tar.gz
netctl-812fdb207b88d7f0bfd022641873d00b66d9071b.tar.xz
Replace pipe to xargs with pipe to while read...
Was trying to fix an issue with /etc/rc.d/functions. Ended up fixing the issue in initscripts instead. But this is a bit simpler for netcfg anyway. Signed-off-by: Jim Pryor <profjim@jimpryor.net>
Diffstat (limited to 'src/net-profiles')
-rw-r--r--src/net-profiles4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/net-profiles b/src/net-profiles
index 6ab179a..4f1c8d6 100644
--- a/src/net-profiles
+++ b/src/net-profiles
@@ -66,7 +66,9 @@ case "$1" in
# shutdown any profiles started by netcfg (or from NET_PROFILES in rc.conf)
# JP: only attempt to disconnect the profiles _this daemon_ was told to control
- cat "$STATE_DIR/net-profiles" 2>/dev/null | xargs -d'\n' /usr/bin/netcfg2 down # JP: use xargs in case any of the profile names contain spaces etc
+ cat "$STATE_DIR/net-profiles" 2>/dev/null | while read profile; do # guard against any of the profile names containing spaces etc
+ /usr/bin/netcfg2 down "$profile"
+ done
rm -f "$STATE_DIR/net-profiles"
rm_daemon net-profiles
;;