Merge branch 'debian-next' into master-next
[live-boot-grml.git] / scripts / boot / 9990-overlay.sh
index 71e9a74..c6de171 100755 (executable)
@@ -392,7 +392,7 @@ setup_unionfs ()
                # Close unused overlays (e.g. due to missing $persistence_list)
                for overlay in ${overlay_devices}
                do
-                       if echo ${used_overlays} | grep -qve "^\(.* \)\?${device}\( .*\)\?$"
+                       if echo ${used_overlays} | grep -qve "^\(.* \)\?${overlay}\( .*\)\?$"
                        then
                                close_persistence_media ${overlay}
                        fi
@@ -402,5 +402,5 @@ setup_unionfs ()
         # ensure that a potentially stray tmpfs gets removed
         # otherways, initramfs-tools is unable to remove /live
         # and fails to boot
-        umount /live/overlay || true
+        umount /live/overlay > /dev/null 2>&1 || true
 }