projects
/
live-boot-grml.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Releasing debian version 3.0~a26-1.
[live-boot-grml.git]
/
scripts
/
live
diff --git
a/scripts/live
b/scripts/live
index
5e080f9
..
e248937
100755
(executable)
--- a/
scripts/live
+++ b/
scripts/live
@@
-1001,7
+1001,7
@@
setup_unionfs ()
if echo ${PERSISTENT_METHOD} | grep -qe "\<overlay\>"
then
if echo ${PERSISTENT_METHOD} | grep -qe "\<overlay\>"
then
- overlays="${root_overlay_label} ${custom_overlay_label}"
+ overlays="${root_overlay_label} ${
old_root_overlay_label} ${old_home_overlay_label} ${
custom_overlay_label}"
fi
if echo ${PERSISTENT_METHOD} | grep -qe "\<snapshot\>"
fi
if echo ${PERSISTENT_METHOD} | grep -qe "\<snapshot\>"
@@
-1013,11
+1013,11
@@
setup_unionfs ()
local home_snapshot_label=""
local root_overlay_label=""
local overlay_devices=""
local home_snapshot_label=""
local root_overlay_label=""
local overlay_devices=""
- for media in $(find_persistent_media "${overlays}" "${snapshots}" "${
blacklistdev}" "${
whitelistdev}")
+ for media in $(find_persistent_media "${overlays}" "${snapshots}" "${whitelistdev}")
do
media="$(echo ${media} | tr ":" " ")"
case ${media} in
do
media="$(echo ${media} | tr ":" " ")"
case ${media} in
- ${root_snapshot_label}=*)
+ ${root_snapshot_label}=*
|${old_root_snapshot_label}=*
)
if [ -z "${root_snapdata}" ]
then
root_snapdata="${media#*=}"
if [ -z "${root_snapdata}" ]
then
root_snapdata="${media#*=}"
@@
-1032,13
+1032,18
@@
setup_unionfs ()
home_snapdata="${media#*=}"
fi
;;
home_snapdata="${media#*=}"
fi
;;
- ${root_overlay_label}=*)
+ ${root_overlay_label}=*
|${old_root_overlay_label}=*
)
if [ -z "${root_overlay_device}" ]
then
device="${media#*=}"
root_overlay_device="${device}"
fi
;;
if [ -z "${root_overlay_device}" ]
then
device="${media#*=}"
root_overlay_device="${device}"
fi
;;
+ ${old_home_overlay_label}=*)
+ device="${media#*=}"
+ fix_home_rw_compatibility ${device}
+ overlay_devices="${overlay_devices} ${device}"
+ ;;
${custom_overlay_label}=*)
device="${media#*=}"
overlay_devices="${overlay_devices} ${device}"
${custom_overlay_label}=*)
device="${media#*=}"
overlay_devices="${overlay_devices} ${device}"
@@
-1214,18
+1219,28
@@
setup_unionfs ()
# Adding custom persistent
if [ -n "${PERSISTENT}" ] && [ -z "${NOPERSISTENT}" ]
then
# Adding custom persistent
if [ -n "${PERSISTENT}" ] && [ -z "${NOPERSISTENT}" ]
then
- local custom_mounts="/custom_mounts.list"
+ local custom_mounts="/
tmp/
custom_mounts.list"
rm -rf ${custom_mounts} 2> /dev/null
# Gather information about custom mounts from devies detected as overlays
rm -rf ${custom_mounts} 2> /dev/null
# Gather information about custom mounts from devies detected as overlays
- get_custom_mounts ${
overlay_devices} ${custom_mounts} ${rootmnt
}
+ get_custom_mounts ${
custom_mounts} ${overlay_devices
}
- [
"${DEBUG}" = "Yes
" ] && cp ${custom_mounts} "${rootmnt}/live/persistent"
+ [
-n "${DEBUG}
" ] && cp ${custom_mounts} "${rootmnt}/live/persistent"
# Now we do the actual mounting (and symlinking)
# Now we do the actual mounting (and symlinking)
- do_custom_mounts ${custom_mounts} ${rootmnt}
+ local used_overlays=""
+ used_overlays=$(activate_custom_mounts ${custom_mounts})
rm ${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
# Look for other snapshots to copy in
try_snap "${root_snapdata}" "${rootmnt}" "ROOT"
# This second type should be removed when snapshot grow smarter