summaryrefslogtreecommitdiffstats
path: root/scripts/netcfg-daemon
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/netcfg-daemon')
-rwxr-xr-xscripts/netcfg-daemon8
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"