diff options
| author | Tails developers <amnesia@boum.org> | 2011-11-08 20:44:11 +0100 |
|---|---|---|
| committer | Daniel Baumann <daniel@debian.org> | 2011-11-24 09:42:08 +0100 |
| commit | a8b46858f239db00a07d1ff482eaff21e61e8b46 (patch) | |
| tree | 7c46c533a76f249e9a7a3873c843c919202d37a6 /scripts | |
| parent | 59220585ee3ca81a12a56aec64c2313538a8ac79 (diff) | |
| download | live-boot-a8b46858f239db00a07d1ff482eaff21e61e8b46.tar.gz live-boot-a8b46858f239db00a07d1ff482eaff21e61e8b46.zip | |
Adding persistent-storage=TYPE...
The comma-separated list TYPE... specifies which types of persistent
storage to use. Current possible TYPEs are {file, filesystem}. For
instance, persistent-storage=filesystem is equivalent to the old
persistent=nofiles, but persistent-storage=file allows to look for
only files, which wasn't possible before. The default is to look for
both, i.e. persistent-storage=filesystem,file.
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/live | 15 | ||||
| -rw-r--r-- | scripts/live-helpers | 4 |
2 files changed, 15 insertions, 4 deletions
diff --git a/scripts/live b/scripts/live index bd7d9c4..92e9d17 100755 --- a/scripts/live +++ b/scripts/live @@ -268,6 +268,11 @@ Arguments () export PERSISTENT_PATH ;; + persistent-storage=*) + PERSISTENT_STORAGE="${ARGUMENT#persistent-storage=}" + export PERSISTENT_STORAGE + ;; + persistent-subtext=*) root_persistence="${root_persistence}-${ARGUMENT#persistent-subtext=}" home_persistence="${home_persistence}-${ARGUMENT#persistent-subtext=}" @@ -390,6 +395,12 @@ Arguments () UNIONTYPE="aufs" export UNIONTYPE fi + + if [ -n "${PERSISTENT}" ] && [ -z "${PERSISTENT_STORAGE}" ] + then + PERSISTENT_STORAGE="filesystem,file" + export PERSISTENT_STORAGE + fi } is_live_path () @@ -1054,13 +1065,13 @@ find_snap () black_listed_devices="${2}" white_listed_devices="${3}" - if [ "${PERSISTENT}" != "nofiles" ] + if echo ${PERSISTENT_STORAGE} | grep -qw file then # search for image files snapdata=$(find_files "${PERSISTENT_PATH}${snap_label}.squashfs ${PERSISTENT_PATH}${snap_label}.cpio.gz ${PERSISTENT_PATH}${snap_label}.ext2 ${PERSISTENT_PATH}${snap_label}.ext3 ${PERSISTENT_PATH}${snap_label}.ext4 ${PERSISTENT_PATH}${snap_label}.jffs2" "${black_listed_devices}" "${white_listed_devices}") fi - if [ -z "${snapdata}" ] + if echo ${PERSISTENT_STORAGE} | grep -qw filesystem && [ -z "${snapdata}" ] then snapdata=$(find_cow_device "${snap_label}" "${black_listed_devices}" "${white_listed_devices}") fi diff --git a/scripts/live-helpers b/scripts/live-helpers index 484ec93..f67e421 100644 --- a/scripts/live-helpers +++ b/scripts/live-helpers @@ -369,13 +369,13 @@ find_cow_device () done fi - if [ "$(/sbin/blkid -s LABEL -o value $devname 2>/dev/null)" = "${pers_label}" ] + if echo ${PERSISTENT_STORAGE} | grep -qw filesystem && [ "$(/sbin/blkid -s LABEL -o value $devname 2>/dev/null)" = "${pers_label}" ] then echo "${devname}" return 0 fi - if [ "${PERSISTENT}" = "nofiles" ] + if ! echo ${PERSISTENT_STORAGE} | grep -qw file then # do not mount the device to find for image files # just skip this |
