[SCM] live-tools branch, debian, updated. debian/3.0.6-1-4-gcda25bc

Daniel Baumann daniel at debian.org
Sun Aug 5 11:21:24 UTC 2012


The following commit has been merged in the debian branch:
commit 8e0d88fa686444df4632556ea04cff096d53c9f2
Author: Daniel Baumann <daniel at debian.org>
Date:   Sun Aug 5 13:13:35 2012 +0200

    Covering cases of live systems where live media is not mounted on /live/image in live-update-initramfs.

diff --git a/bin/live-update-initramfs b/bin/live-update-initramfs
index 9da0f74..23656a4 100755
--- a/bin/live-update-initramfs
+++ b/bin/live-update-initramfs
@@ -10,22 +10,31 @@
 
 set -e
 
-if grep -qs "boot=live" /proc/cmdline && \
-   grep -qs "\/live\/image" /proc/mounts
+if grep -qs "boot=live" /proc/cmdline
 then
-	_DEVICE="$(awk '/\/live\/image/ { print $1 }' /proc/mounts)"
+	if grep -qs "\/live\/image" /proc/mounts
+	then
+		# live system with live media mounted as /live/image
+		_DEVICE="$(awk '/\/live\/image/ { print $1 }' /proc/mounts)"
 
-	mount -o remount,rw ${_DEVICE} > /dev/null 2>&1 || true
+		mount -o remount,rw ${_DEVICE} > /dev/null 2>&1 || true
 
-	if touch /live/image/.test > /dev/null 2>&1
-	then
-		_READ_WRITE="true"
+		if touch /live/image/.test > /dev/null 2>&1
+		then
+			_READ_WRITE="true"
 
-		rm -f /live/image/.test
+			rm -f /live/image/.test
+		else
+			_READ_WRITE="false"
+		fi
 	else
-		_READ_WRITE="false"
+		# live system without live media mounted as /live/image
+		echo "I: update-initramfs is disabled (live system is running without media mounted on /live/image)."
+
+		exit 0
 	fi
 else
+	# non-live system
 	/usr/sbin/update-initramfs.initramfs-tools "${@}"
 
 	exit "${?}"

-- 
live-tools



More information about the debian-live-changes mailing list