diff options
-rwxr-xr-x | scripts/netcfg-daemon | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/netcfg-daemon b/scripts/netcfg-daemon index 0291908..97ed1ef 100755 --- a/scripts/netcfg-daemon +++ b/scripts/netcfg-daemon @@ -39,12 +39,12 @@ case "$1" in # Stop the profiles in the reverse order they were started. tac "$STATE_FILE" | ( while read profile; do - if [[ "$profile" = "${profile#@}" ]]; then - if [[ -e "$STATE_DIR/profiles/$profile" ]]; then + if [[ -e "$STATE_DIR/profiles/${profile#@}" ]]; then + if [[ "$profile" = "${profile#@}" ]]; then /usr/bin/netcfg down "$profile" || exit $? + else + /usr/bin/netcfg down "${profile#@}" & fi - else - /usr/bin/netcfg down "${profile#@}" >/dev/null & fi done rm "$STATE_FILE" |