X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=scripts%2Flive;h=e2489373255df46c1b698cc500fa3f8c5619af6c;hb=fe3b574c47a81858e256abd8fde409eda4dc99e1;hp=a24da07be6adc73b81e3abd04880d23443c1704b;hpb=5ca613caa8948bb2686b592880f45caaa61e4662;p=live-boot-grml.git diff --git a/scripts/live b/scripts/live index a24da07..e248937 100755 --- a/scripts/live +++ b/scripts/live @@ -1228,9 +1228,19 @@ setup_unionfs () [ -n "${DEBUG}" ] && cp ${custom_mounts} "${rootmnt}/live/persistent" # Now we do the actual mounting (and symlinking) - do_custom_mounts ${custom_mounts} + local used_overlays="" + used_overlays=$(activate_custom_mounts ${custom_mounts}) rm ${custom_mounts} + # Close unused overlays (e.g. due to missing $persistence_list) + for overlay in ${overlay_devices} + do + if echo ${used_overlays} | grep -qve "^\(.* \)\?${device}\( .*\)\?$" + then + close_persistent_media ${overlay} + fi + done + # Look for other snapshots to copy in try_snap "${root_snapdata}" "${rootmnt}" "ROOT" # This second type should be removed when snapshot grow smarter