summaryrefslogtreecommitdiffstats
path: root/shutdown
diff options
context:
space:
mode:
Diffstat (limited to 'shutdown')
-rw-r--r--shutdown12
1 files changed, 6 insertions, 6 deletions
diff --git a/shutdown b/shutdown
index dc293d4..b0934b7 100644
--- a/shutdown
+++ b/shutdown
@@ -75,12 +75,6 @@ fi
# chdir, so that we can avoid a lot of path chopping
cd /sys/class/block
-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
@@ -99,6 +93,12 @@ END {
umount "$mount"
done
+printf '%s\n' 'Detaching loop devices.'
+
+for loop in loop*/loop; do
+ [ -e "$loop" ] && losetup -d "${loop%/loop}"
+done
+
printf '%s\n' "Disassembling stacked devices."
# iterate over devices with holders