From 5a7040d717646d31833880dae2e61daec4ad2e6c Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Thu, 29 Mar 2012 14:53:38 -0400 Subject: shutdown: refine umount_all logic remove the mountpoint filtering from the awk processing and drop the -l flag from umount. Not clear why either of these were present -- they're both wrong. Signed-off-by: Dave Reisner --- shutdown | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'shutdown') diff --git a/shutdown b/shutdown index 2e6f504..20510b2 100755 --- a/shutdown +++ b/shutdown @@ -57,10 +57,10 @@ disassemble() { printf '%s\n' "Unmounting all devices." -# unmount everything, but leave the API mounts +# unmount everything in /oldroot findmnt -Rruno TARGET /oldroot | awk ' BEGIN { i = 0 } -! /^\/(proc|dev|sys)/ { +{ i++ mounts[i] = $0 } @@ -70,7 +70,7 @@ END { } } ' | while read -r mount; do - umount -l "$mount" + umount "$mount" done printf '%s\n' "Disassembling stacked devices." -- cgit v1.2.3-24-g4f1b