dmsquash-live: add systemd checkisomd5 service

master
Harald Hoyer 2012-12-14 08:57:22 +01:00
parent 7990578443
commit 040f388331
2 changed files with 19 additions and 1 deletions

View File

@ -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

View File

@ -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