Browse Source

dmsquash-live: add systemd checkisomd5 service

master
Harald Hoyer 12 years ago
parent
commit
040f388331
  1. 13
      modules.d/90dmsquash-live/checkisomd5@.service
  2. 7
      modules.d/90dmsquash-live/dmsquash-live-root.sh

13
modules.d/90dmsquash-live/checkisomd5@.service

@ -0,0 +1,13 @@ @@ -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

7
modules.d/90dmsquash-live/dmsquash-live-root.sh

@ -32,7 +32,12 @@ fi @@ -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

Loading…
Cancel
Save