summaryrefslogtreecommitdiffstats
path: root/src/netcfg
diff options
context:
space:
mode:
authorJames Rayner <james@rayner.id.au>2010-11-21 03:46:25 +0100
committerJames Rayner <james@rayner.id.au>2010-11-21 03:46:25 +0100
commit93540ca0206a577ecfb15b5a08f8df12c728912a (patch)
tree45cf06adcf412ca9500464a88c81ff8c6aa4c65a /src/netcfg
parent54edd2ea761b64dd44fc4b92eef90faaa2fbe2b0 (diff)
downloadnetctl-93540ca0206a577ecfb15b5a08f8df12c728912a.tar.gz
netctl-93540ca0206a577ecfb15b5a08f8df12c728912a.tar.xz
FS#17546 - Don't prevent unmounting if netcfg run in transiently mounted directory & children retain cwd
Diffstat (limited to 'src/netcfg')
-rw-r--r--src/netcfg3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/netcfg b/src/netcfg
index ea971b3..cfa7638 100644
--- a/src/netcfg
+++ b/src/netcfg
@@ -55,6 +55,9 @@ if [[ $(id -u) -gt 0 ]]; then
exit_stderr "This script should be run as root."
fi
+# Ensure cwd is not in a transient directory, which may prevent unmounting due to netcfg children
+cd /
+
case "$1" in
-c|check-iface|-u|up)