From 9e5e455c09ffacbac2bdc2e5dbccd849e5c08824 Mon Sep 17 00:00:00 2001 From: Jouke Witteveen Date: Mon, 30 Apr 2012 12:22:52 +0200 Subject: Output tweaks in netcfg-daemon Don't try to bring down backgrounded profiles if they are not up, preventing "not connected" messages. --- scripts/netcfg-daemon | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'scripts') 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" -- cgit v1.2.3-24-g4f1b