From 247766695cd7c5e8d83dff72f7eb7e6578bf57b8 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Thu, 9 Oct 2008 16:36:42 +0000 Subject: Fix umounting reporting exit status, Gentoo #239922. --- sh/rc-mount.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'sh') 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 # 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 -- cgit v1.2.3