[SCM] Debian Live initramfs hook branch, master, updated. 1.139.1-3-14-gbb27306

Marco Amadori amadorim at vdavda.com
Wed Oct 1 00:05:26 UTC 2008


The following commit has been merged in the master branch:
commit 4a21b7441755b0ca9bd5421364ed1e2839874858
Author: Marco Amadori <marco.amadori at gmail.com>
Date:   Sat Sep 27 11:18:15 2008 +0200

    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.
    
    Signed-off-by: Marco Amadori <marco.amadori at gmail.com>

diff --git a/docs/parameters.txt b/docs/parameters.txt
index e09089d..fd05339 100644
--- a/docs/parameters.txt
+++ b/docs/parameters.txt
@@ -38,7 +38,7 @@ live nosudo
 live swapon
 live nouser
 live noxautoconfig
-live persistent
+live persistent[=nofiles]
 live {preseed/file|file}=FILE
 live package/question=VALUE
 live quickreboot
diff --git a/manpages/live-initramfs.en.7.txt b/manpages/live-initramfs.en.7.txt
index a66a85c..f42a9ce 100644
--- a/manpages/live-initramfs.en.7.txt
+++ b/manpages/live-initramfs.en.7.txt
@@ -197,14 +197,16 @@ This parameter disables Xorg auto-reconfiguration at boot time. This is valuable
 if you either do the detection on your own, or, if you want to ship a custom,
 premade xorg.conf in your live system.
 
-  persistent::
+  persistent[=nofiles]::
 
 live-initramfs will look for persistent and snapshot partitions or files labeled
 "live-rw", "home-rw", and files called "live-sn*", "home-sn*" and will try to,
 in order: mount as /cow the first, mount the second in /home, and just copy the
 contents of the latter in appropriate locations (snapshots). Snapshots will be
 tried to be updated on reboot/shutdown. Look at live-snapshot(1) for more
-informations.
+informations. If "nofiles" is specified too, only labels will be searched and no
+filesystems will be mounted for searching file images or archives; this will
+results in improved boot times.
 
   {preseed/file|file}=**FILE**::
 
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}"

-- 
Debian Live initramfs hook



More information about the debian-live-changes mailing list