summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Rayner <james@archlinux.org>2010-01-31 00:24:30 +0100
committerJames Rayner <james@archlinux.org>2010-01-31 00:27:21 +0100
commit279a441f8cb5f7e41e68678bc7b875160d4fe0d5 (patch)
tree3df88cadff9a634a2dd6bf111e8019ea81e0da64
parentb6964c5f37deb1bd7a265268ba8abf59c01e7694 (diff)
downloadnetctl-279a441f8cb5f7e41e68678bc7b875160d4fe0d5.tar.gz
netctl-279a441f8cb5f7e41e68678bc7b875160d4fe0d5.tar.xz
Make net-profiles take all networks down correctly, fix FS#17406
-rw-r--r--src/net-profiles4
1 files 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"