From 040f388331964b4e035bdf54c91d8e3fc8488681 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 14 Dec 2012 08:57:22 +0100 Subject: [PATCH] dmsquash-live: add systemd checkisomd5 service --- modules.d/90dmsquash-live/checkisomd5@.service | 13 +++++++++++++ modules.d/90dmsquash-live/dmsquash-live-root.sh | 7 ++++++- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 modules.d/90dmsquash-live/checkisomd5@.service diff --git a/modules.d/90dmsquash-live/checkisomd5@.service b/modules.d/90dmsquash-live/checkisomd5@.service new file mode 100644 index 00000000..20e40bd7 --- /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 a7bb202b..ec22977f 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