Correcting debug variables through out the code to use the same one.
[live-boot-grml.git] / scripts / boot / 9990-overlay.sh
index 71e9a74..6b62093 100755 (executable)
@@ -381,7 +381,7 @@ setup_unionfs ()
                # Gather information about custom mounts from devies detected as overlays
                get_custom_mounts ${custom_mounts} ${overlay_devices}
 
-               [ -n "${DEBUG}" ] && cp ${custom_mounts} "/lib/live/mount/persistence"
+               [ -n "${LIVE_BOOT_DEBUG}" ] && cp ${custom_mounts} "/lib/live/mount/persistence"
 
                # Now we do the actual mounting (and symlinking)
                local used_overlays
@@ -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
 }