From 812fdb207b88d7f0bfd022641873d00b66d9071b Mon Sep 17 00:00:00 2001 From: Jim Pryor Date: Tue, 25 Aug 2009 20:18:49 -0400 Subject: 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 --- src/net-profiles | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/net-profiles') 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 ;; -- cgit v1.2.3-24-g4f1b