From: Harald Hoyer Date: Fri, 14 Dec 2012 07:57:22 +0000 (+0100) Subject: dmsquash-live: add systemd checkisomd5 service X-Git-Tag: 025~43 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=040f388331964b4e035bdf54c91d8e3fc8488681;p=thirdparty%2Fdracut.git dmsquash-live: add systemd checkisomd5 service --- diff --git a/modules.d/90dmsquash-live/checkisomd5@.service b/modules.d/90dmsquash-live/checkisomd5@.service new file mode 100644 index 000000000..20e40bd7c --- /dev/null +++ b/modules.d/90dmsquash-live/checkisomd5@.service @@ -0,0 +1,13 @@ +[Unit] +Description=Media check on %f +DefaultDependencies=no +Before=shutdown.target + +[Service] +Type=oneshot +RemainAfterExit=no +ExecStart=/bin/checkisomd5 --verbose %f +StandardInput=tty-force +StandardOutput=inherit +StandardError=inherit +TimeoutSec=0 diff --git a/modules.d/90dmsquash-live/dmsquash-live-root.sh b/modules.d/90dmsquash-live/dmsquash-live-root.sh index a7bb202b2..ec22977f5 100755 --- a/modules.d/90dmsquash-live/dmsquash-live-root.sh +++ b/modules.d/90dmsquash-live/dmsquash-live-root.sh @@ -32,7 +32,12 @@ fi getarg rd.live.check -d check || check="" if [ -n "$check" ]; then [ -x /bin/plymouth ] && /bin/plymouth --hide-splash - checkisomd5 --verbose $livedev + if [ -n "DRACUT_SYSTEMD" ]; then + p=$(str_replace "$livedev" "-" '\x2d') + systemctl start checkisomd5@${p}.service + else + checkisomd5 --verbose $livedev + fi if [ $? -ne 0 ]; then die "CD check failed!" exit 1