summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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)