[PATCH] run checkisomd5 from anaconda-diskroot (#848764)

Brian C. Lane bcl at redhat.com
Wed Oct 24 00:55:19 UTC 2012


From: "Brian C. Lane" <bcl at redhat.com>

anaconda-dracut always passes a path to dmsquash-live-root so its
checkisomd5 never runs (it needs a block device).
---
 dracut/anaconda-diskroot | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/dracut/anaconda-diskroot b/dracut/anaconda-diskroot
index 612a131..1495cd8 100755
--- a/dracut/anaconda-diskroot
+++ b/dracut/anaconda-diskroot
@@ -5,6 +5,24 @@
 . /lib/anaconda-lib.sh
 command -v getarg >/dev/null || . /lib/dracut-lib.sh
 
+# Run checkisomd5 on a device
+run_checkisomd5 {
+    livedev=$1
+    [ -b $livedev ] && fs=$(blkid -s TYPE -o value $livedev)
+    if [ "$fs" = "iso9660" -o "$fs" = "udf" ]; then
+        check="yes"
+    fi
+    getarg rd.live.check -d check || check=""
+    if [ -n "$check" ]; then
+        [ -x /bin/plymouth ] && /bin/plymouth --hide-splash
+        checkisomd5 --verbose $livedev
+        if [ $? -ne 0 ]; then
+            die "CD check failed!"
+            exit 1
+        fi
+        [ -x /bin/plymouth ] && /bin/plymouth --show-splash
+    fi
+}
 
 dev="$1"
 path="$2" # optional, could be empty
@@ -14,3 +32,4 @@ path="$2" # optional, could be empty
 info "anaconda using disk root at $dev"
 mount $dev $repodir || warn "Couldn't mount $dev"
 anaconda_live_root_dir $repodir $path
+run_checkisomd5 $dev
-- 
1.7.11.7



More information about the anaconda-patches mailing list