[SCM] live-boot branch, debian, updated. debian/3.0_a25-1-72-gfc7a680
Daniel Baumann
daniel at debian.org
Thu Apr 5 06:21:39 UTC 2012
The following commit has been merged in the debian branch:
commit baa35e3dbde1d68bedca73fa03425d0a7d8b374c
Author: Tails developers <amnesia at boum.org>
Date: Tue Feb 7 18:05:42 2012 +0100
Separate overlay labels for full and custom persistence.
Full root persistence through overlays is specified with "full-ov",
and custom persistent mounts with "custom-ov". Previously they used
the same label ("live-rw") and the existence of live.persist
determined whether it should be used for full persistence or custom
mounts. That was a bit dangerous since a misspelled live.persist could
cause data loss etc.
diff --git a/scripts/live b/scripts/live
index 561c0e0..e80c470 100755
--- a/scripts/live
+++ b/scripts/live
@@ -11,7 +11,8 @@ mountpoint="/live/image"
alt_mountpoint="/media"
LIVE_MEDIA_PATH="live"
-root_persistence="live-rw"
+root_overlay_label="full-ov"
+custom_overlay_label="custom-ov"
root_snapshot_label="live-sn"
home_snapshot_label="home-sn"
persistence_list="live.persist"
@@ -273,8 +274,8 @@ Arguments ()
;;
persistent-subtext=*)
- root_persistence="${root_persistence}-${ARGUMENT#persistent-subtext=}"
- home_persistence="${home_persistence}-${ARGUMENT#persistent-subtext=}"
+ root_overlay_label="${root_overlay_label}-${ARGUMENT#persistent-subtext=}"
+ custom_overlay_label="${custom_overlay_label}-${ARGUMENT#persistent-subtext=}"
root_snapshot_label="${root_snapshot_label}-${ARGUMENT#persistent-subtext=}"
home_snapshot_label="${home_snapshot_label}-${ARGUMENT#persistent-subtext=}"
;;
@@ -1360,7 +1361,7 @@ setup_unionfs ()
mkdir -p /cow
- # Looking for "${root_persistence}" device or file
+ # Looking for persistent devices or files
if [ -n "${PERSISTENT}" ] && [ -z "${NOPERSISTENT}" ]
then
@@ -1405,7 +1406,7 @@ setup_unionfs ()
if echo ${PERSISTENT_METHOD} | grep -qe "\<overlay\>"
then
- overlays="${root_persistence}"
+ overlays="${root_overlay_label} ${custom_overlay_label}"
fi
if echo ${PERSISTENT_METHOD} | grep -qe "\<snapshot\>"
@@ -1427,23 +1428,24 @@ setup_unionfs ()
# ext2|ext3|ext4|jffs2 snapshot types.
home_snapdata="${media#*=}"
;;
- *)
+ ${root_overlay_label}=*)
+ device="${media#*=}"
+ root_overlay_device="${device}"
+ ;;
+ ${custom_overlay_label}=*)
device="${media#*=}"
overlay_devices="${overlay_devices} ${device}"
;;
esac
done
- if [ -b "${cowprobe}" ] || [ -b "${homecow}" ]
+ if [ -b "${root_overlay_device}" ]
then
PERSISTENCE_IS_ON="1"
export PERSISTENCE_IS_ON
- fi
- if [ -b "${cowprobe}" ]
- then
- cowdevice=${cowprobe}
- cow_fstype=$(get_fstype "${cowprobe}")
+ cowdevice=${root_overlay_device}
+ cow_fstype=$(get_fstype "${root_overlay_device}")
if [ -z "${PERSISTENT_READONLY}" ]
then
cow_mountopt="rw,noatime"
@@ -1776,6 +1778,9 @@ setup_unionfs ()
then
link_files "${links_source}" "${links_dest}" "${rootmnt}"
fi
+
+ PERSISTENCE_IS_ON="1"
+ export PERSISTENCE_IS_ON
done < ${custom_mounts}
rm -f ${bindings}
--
live-boot
More information about the debian-live-changes
mailing list