shutdown: call "losetup -D" on shutdown
authorHarald Hoyer <harald@redhat.com>
Tue, 5 Feb 2013 10:02:05 +0000 (11:02 +0100)
committerHarald Hoyer <harald@redhat.com>
Tue, 5 Feb 2013 10:04:02 +0000 (11:04 +0100)
modules.d/99shutdown/module-setup.sh
modules.d/99shutdown/shutdown.sh

index 16e727c..fb0b7ad 100755 (executable)
@@ -13,7 +13,7 @@ depends() {
 
 install() {
     local _d
-    dracut_install umount poweroff reboot halt
+    dracut_install umount poweroff reboot halt losetup
     dracut_install -o kexec
     inst "$moddir/shutdown.sh" "$prefix/shutdown"
     [ -e "${initdir}/lib" ] || mkdir -m 0755 -p ${initdir}/lib
index bab81f2..202ecb1 100755 (executable)
@@ -46,6 +46,7 @@ umount_a() {
             fi
         fi
     done </proc/mounts
+    losetup -D
     [ "$_did_umount" = "y" ] && return 0
     return 1
 }