El Friday 16 November 2007 23:12:01 Daniel Baumann va escriure:
> Jordi Pujol wrote:
> > I was looking into the live-initramfs code and adding or correcting
> > something,
>
> nice, but can you break out patches please?

Yes, apply this for rootdelay when no root path is specified or when is a 
rootdelay .

diff -Naur scripts/live ../initrd/scripts/live > /tmp/rootdelay.patch

this weekend I'll work extracting more patches,

--- scripts/live	2007-11-17 14:31:08.000000000 +0100
+++ ../initrd/scripts/live	2007-11-16 16:58:15.000000000 +0100
@@ -1206,14 +1324,19 @@
 
 set_usplash_timeout ()
 {
+	local timeout="${1}"
+
+	[ -z "${timeout}" ] && timeout=120
 	if [ -x /sbin/usplash_write ]
 	then
-		/sbin/usplash_write "TIMEOUT 120"
+		/sbin/usplash_write "TIMEOUT ${timeout}"
 	fi
 }
 
 mountroot ()
 {
+	local slumber livefs_root
+
 	exec 6>&1
 	exec 7>&2
 	exec > live.log
@@ -1221,6 +1344,29 @@
 
 	Arguments
 
+	# Default delay is 180s
+	if [ -z "${ROOTDELAY}" ]; then
+		slumber=180
+	else
+		slumber=${ROOTDELAY}
+	fi
+	
+	slumber=$(( ${slumber} * 10 ))
+	while [ ! -e "${ROOT}" ] \
+	|| ! $(get_fstype "${ROOT}" >/dev/null); do
+		set_usplash_timeout "${slumber}"
+		/bin/sleep 0.1
+		slumber=$(( ${slumber} - 1 ))
+		[ ${slumber} -gt 0 ] || break
+	done
+	
+	if [ ${slumber} -gt 0 ]; then
+		log_end_msg 0
+	else
+		log_end_msg 1 || true
+	fi
+	set_usplash_timeout "15"
+
 	set_usplash_timeout
 	[ "${quiet}" != "y" ] && log_begin_msg "Running /scripts/live-premount"
 	pulsate
_______________________________________________
debian-live-devel mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/debian-live-devel

Reply via email to