summaryrefslogtreecommitdiffstats
path: root/dracut
diff options
context:
space:
mode:
authorBrian C. Lane <bcl@redhat.com>2012-10-26 16:09:45 -0700
committerBrian C. Lane <bcl@redhat.com>2012-10-29 09:27:04 -0700
commitb98b2337b0fc1af6d991e0e184b3938b64a54f81 (patch)
tree03a7e42f5e9f9a4fdae25028e16d10db6426d20f /dracut
parentf725218bd1fc59bde27f2d593298902e9c8ccd5f (diff)
downloadanaconda-b98b2337b0fc1af6d991e0e184b3938b64a54f81.tar.gz
anaconda-b98b2337b0fc1af6d991e0e184b3938b64a54f81.tar.xz
anaconda-b98b2337b0fc1af6d991e0e184b3938b64a54f81.zip
run checkisomd5 from anaconda-diskroot (#848764)
anaconda-dracut always passes a path to dmsquash-live-root so its checkisomd5 never runs (it needs a block device).
Diffstat (limited to 'dracut')
-rwxr-xr-xdracut/anaconda-diskroot19
1 files changed, 18 insertions, 1 deletions
diff --git a/dracut/anaconda-diskroot b/dracut/anaconda-diskroot
index 612a1313b..051081b39 100755
--- a/dracut/anaconda-diskroot
+++ b/dracut/anaconda-diskroot
@@ -3,8 +3,24 @@
# usage: anaconda-diskroot DEVICE [PATH]
. /lib/anaconda-lib.sh
-command -v getarg >/dev/null || . /lib/dracut-lib.sh
+command -v getargbool >/dev/null || . /lib/dracut-lib.sh
+# Run checkisomd5 on a device
+run_checkisomd5() {
+ livedev=$1
+ if getargbool 0 rd.live.check -d check; then
+ [ -b $livedev ] && fs=$(blkid -s TYPE -o value $livedev)
+ if [ "$fs" = "iso9660" -o "$fs" = "udf" ]; 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
+ fi
+}
dev="$1"
path="$2" # optional, could be empty
@@ -14,3 +30,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