summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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
;;