# 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
# 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
}