From 990480f58dde1722f8ab87514b4443c1ea418b85 Mon Sep 17 00:00:00 2001 From: Marco Amadori Date: Sat, 27 Sep 2008 11:18:15 +0200 Subject: 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. --- scripts/live | 17 ++++++++++++++++- scripts/live-helpers | 7 +++++++ 2 files changed, 23 insertions(+), 1 deletion(-) (limited to 'scripts') 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}" -- cgit v1.2.3