From 279a441f8cb5f7e41e68678bc7b875160d4fe0d5 Mon Sep 17 00:00:00 2001 From: James Rayner Date: Sun, 31 Jan 2010 10:24:30 +1100 Subject: Make net-profiles take all networks down correctly, fix FS#17406 --- src/net-profiles | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/net-profiles b/src/net-profiles index fe57762..cbaea30 100644 --- a/src/net-profiles +++ b/src/net-profiles @@ -43,7 +43,7 @@ case "$1" in for network in "${NETWORKS[@]}"; do if [[ "$network" = "${network#!}" ]]; then if /usr/bin/netcfg2 check-iface "$network"; then - echo "$network" > "$STATE_DIR/net-profiles" + echo "$network" >> "$STATE_DIR/net-profiles" add_daemon net-profiles fi fi @@ -60,7 +60,7 @@ 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 | while read profile; do # guard against any of the profile names containing spaces etc + for profile in $(cat "$STATE_DIR/net-profiles"); do /usr/bin/netcfg2 down "$profile" done rm -f "$STATE_DIR/net-profiles" -- cgit v1.2.3-24-g4f1b