[SCM] live-boot branch, debian-next, updated. debian/3.0_a29-1-5-g178b81c

Daniel Baumann daniel at debian.org
Tue Jun 5 14:55:09 UTC 2012


The following commit has been merged in the debian-next branch:
commit 178b81c7d5f47f4ef10a809a0ae7dd3ae4a76384
Author: Daniel Baumann <daniel at debian.org>
Date:   Tue Jun 5 16:55:08 2012 +0200

    Splitting out integrity-check function to subscript.

diff --git a/scripts/boot.sh b/scripts/boot.sh
index 3211ed0..90750b5 100755
--- a/scripts/boot.sh
+++ b/scripts/boot.sh
@@ -429,32 +429,6 @@ find_livefs ()
 	return 1
 }
 
-integrity_check ()
-{
-	media_mountpoint="${1}"
-
-	log_begin_msg "Checking media integrity"
-
-	cd ${media_mountpoint}
-	/bin/md5sum -c md5sum.txt < /dev/tty8 > /dev/tty8
-	RC="${?}"
-
-	log_end_msg
-
-	if [ "${RC}" -eq 0 ]
-	then
-		log_success_msg "Everything ok, will reboot in 10 seconds."
-		sleep 10
-		cd /
-		umount ${media_mountpoint}
-		sync
-		echo u > /proc/sysrq-trigger
-		echo b > /proc/sysrq-trigger
-	else
-		panic "Not ok, a media defect is likely, switch to VT8 for details."
-	fi
-}
-
 mountroot ()
 {
 	if [ -x /scripts/local-top/cryptroot ]; then
diff --git a/scripts/boot/integrity-check.sh b/scripts/boot/integrity-check.sh
new file mode 100755
index 0000000..08f9583
--- /dev/null
+++ b/scripts/boot/integrity-check.sh
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+#set -e
+
+integrity_check ()
+{
+	media_mountpoint="${1}"
+
+	log_begin_msg "Checking media integrity"
+
+	cd ${media_mountpoint}
+	/bin/md5sum -c md5sum.txt < /dev/tty8 > /dev/tty8
+	RC="${?}"
+
+	log_end_msg
+
+	if [ "${RC}" -eq 0 ]
+	then
+		log_success_msg "Everything ok, will reboot in 10 seconds."
+		sleep 10
+		cd /
+		umount ${media_mountpoint}
+		sync
+		echo u > /proc/sysrq-trigger
+		echo b > /proc/sysrq-trigger
+	else
+		panic "Not ok, a media defect is likely, switch to VT8 for details."
+	fi
+}

-- 
live-boot



More information about the debian-live-changes mailing list