diff options
Diffstat (limited to 'sh/rc-mount.sh')
-rw-r--r-- | sh/rc-mount.sh | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sh/rc-mount.sh b/sh/rc-mount.sh index 68aa4c86..135f2f5c 100644 --- a/sh/rc-mount.sh +++ b/sh/rc-mount.sh @@ -1,6 +1,10 @@ # Copyright 2007-2008 Roy Marples <roy@marples.name> # All rights reserved. Released under the 2-clause BSD license. +# Declare this here so that no formatting doesn't affect the embedded newline +__IFS=" +" + # Handy function to handle all our unmounting needs # mountinfo is a C program to actually find our mounts on our supported OS's # We rely on fuser being preset, so if it's not then we don't unmount anything. @@ -15,7 +19,10 @@ do_unmount() fi shift - mountinfo "$@" | while read mnt; do + local IFS="$__IFS" + set -- $(mountinfo "$@") + unset IFS + for mnt; do # Unmounting a shared mount can unmount other mounts, so # we need to check the mount is still valid mountinfo --quiet "${mnt}" || continue |