link root libraries and fsck the persistent home partition, if required
diff -Naur initrd-110-7-orig.txt/scripts/live initrd.txt/scripts/live
--- initrd-110-7-orig.txt/scripts/live	2007-11-19 10:58:26.000000000 +0100
+++ initrd.txt/scripts/live	2007-11-19 12:32:24.000000000 +0100
@@ -2,10 +2,7 @@
 
 # set -e
 
-export PATH="/root/usr/bin:/root/usr/sbin:/root/bin:/root/sbin:/usr/bin:/usr/sbin:/bin:/sbin"
-
-echo "/root/lib" >> /etc/ld.so.conf
-echo "/root/usr/lib" >> /etc/ld.so.conf
+export PATH="/usr/bin:/usr/sbin:/bin:/sbin"
 
 mountpoint="/live/image"
 LIVE_MEDIA_PATH="live"
@@ -400,6 +404,93 @@
 				XVIDEOMODE="${ARGUMENT#xvideomode=}"
 				export XVIDEOMODE
 				;;
+
+			fsckdevices)
+				FSCKDEVICES="Yes"
+				export FSCKDEVICES
+				;;
+
 		esac
 	done
 
@@ -1055,8 +1155,21 @@
 	mkdir -p "${rootmnt}/live"
 	mount -t tmpfs tmpfs ${rootmnt}/live
 
+	# Append the root PATH and Update link bindings only if needed
+	if [ "${FSCKDEVICES}" = "Yes" ]
+	then
+		log_begin_msg "Updating dynamic linker run-time bindings"
+		export PATH="/root/usr/bin:/root/usr/sbin:/root/bin:/root/sbin:${PATH}"
+		echo "/root/lib" >> /etc/ld.so.conf
+		echo "/root/usr/lib" >> /etc/ld.so.conf
+		verbose=""
+		[ -n "${DEBUG}" ] && verbose="-v"
+		ldconfig ${verbose}
+	fi
+	log_end_msg
+
 	# Adding other custom mounts
 	if [ -n "${PERSISTENT}" ]
 	then
 		# directly mount /home
 		# FIXME: add a custom mounts configurable system
@@ -1064,6 +1177,7 @@
 
 		if [ -b "${homecow}" ]
 		then
+			[ "${FSCKDEVICES}" = "Yes" ] && fsck_device "${homecow}"
 			mount -t $(get_fstype "${homecow}") -o rw,noatime "${homecow}" "${rootmnt}/home"
 			export HOMEMOUNTED=1 # used to proper calculate free space in do_snap_copy()
 		else
_______________________________________________
debian-live-devel mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/debian-live-devel

Reply via email to