diff options
| author | Marco Amadori <marco.amadori@gmail.com> | 2008-09-27 11:18:15 +0200 |
|---|---|---|
| committer | Daniel Baumann <daniel@debian.org> | 2011-03-09 17:48:02 +0100 |
| commit | 990480f58dde1722f8ab87514b4443c1ea418b85 (patch) | |
| tree | aaca791799942a733d09d8d391a8276c68c8cc7d /scripts | |
| parent | 7e61a38fb7e7c6c2fdcb0b01c526b6fefc3a87e6 (diff) | |
| download | live-boot-990480f58dde1722f8ab87514b4443c1ea418b85.tar.gz live-boot-990480f58dde1722f8ab87514b4443c1ea418b85.zip | |
Search for partition labels only (Closes: #486469).
* Added new way to call "persistent" at boot:
"persistent=nofiles" will skip the scan for image files in block
device and it will only search for partition labels.
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/live | 17 | ||||
| -rw-r--r-- | scripts/live-helpers | 7 |
2 files changed, 23 insertions, 1 deletions
diff --git a/scripts/live b/scripts/live index 7e0b100..8761138 100755 --- a/scripts/live +++ b/scripts/live @@ -326,6 +326,15 @@ Arguments () export PERSISTENT ;; + persistent=*) + PERSISTENT="${ARGUMENT#persistent=}" + if [ -z "${PERSISTENT}" ] + then + PERSISTENT="Yes" + fi + export PERSISTENT + ;; + nopersistent) NOPERSISTENT="Yes" export NOPERSISTENT @@ -881,7 +890,13 @@ find_snap () { # Look for ${snap_label}.* in block devices snap_label="${1}" - snapdata=$(find_files "${snap_label}.squashfs ${snap_label}.cpio.gz ${snap_label}.ext2 ${snap_label}.ext3 ${snap_label}.jffs2") + + if [ "${PERSISTENT}" != "nofiles" ] + then + # search for image files + snapdata=$(find_files "${snap_label}.squashfs ${snap_label}.cpio.gz ${snap_label}.ext2 ${snap_label}.ext3 ${snap_label}.jffs2") + fi + if [ -z "${snapdata}" ] then snapdata=$(find_cow_device "${snap_label}") diff --git a/scripts/live-helpers b/scripts/live-helpers index 44bb12a..a935001 100644 --- a/scripts/live-helpers +++ b/scripts/live-helpers @@ -313,6 +313,13 @@ find_cow_device () return fi + if [ "${PERSISTENT}" = "nofiles" ] + then + # do not mount the device to find for image files + # just skip this + break + fi + case "$(get_fstype ${devname})" in vfat|ext2|ext3|jffs2) mkdir -p "${cow_backing}" |
