From fc7097a016472a084bd8428c027e60d5dfd3aa40 Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Fri, 30 Mar 2012 00:33:37 -0400 Subject: shutdown: detach all loop devices before umounting Signed-off-by: Dave Reisner --- shutdown | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'shutdown') diff --git a/shutdown b/shutdown index 20510b2..ce7de23 100755 --- a/shutdown +++ b/shutdown @@ -55,6 +55,12 @@ disassemble() { done } +printf '%s\n' 'Detaching loop devices.' + +for loop in loop*/loop; do + [ -e "$loop" ] && losetup -d "${loop%/loop}" +done + printf '%s\n' "Unmounting all devices." # unmount everything in /oldroot -- cgit v1.2.3-24-g4f1b