summaryrefslogtreecommitdiffstats
path: root/shutdown
diff options
context:
space:
mode:
Diffstat (limited to 'shutdown')
-rwxr-xr-xshutdown6
1 files changed, 6 insertions, 0 deletions
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