contrib: dracut: zfs-{rollback,snapshot}-bootfs: don't shell for test

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13017
This commit is contained in:
наб 2022-01-26 14:42:13 +01:00 committed by Brian Behlendorf
parent 34ec548980
commit b8d9679f36
2 changed files with 2 additions and 2 deletions

View File

@ -9,6 +9,6 @@ ConditionKernelCommandLine=bootfs.rollback
[Service] [Service]
# ${BOOTFS} should have been set by zfs-env-bootfs.service # ${BOOTFS} should have been set by zfs-env-bootfs.service
Type=oneshot Type=oneshot
ExecStartPre=/bin/sh -c 'test -n "${BOOTFS}"' ExecStartPre=/bin/test -n ${BOOTFS}
ExecStart=/bin/sh -c '. /lib/dracut-lib.sh; SNAPNAME="$(getarg bootfs.rollback)"; exec @sbindir@/zfs rollback -Rf "${BOOTFS}@${SNAPNAME:-%v}"' ExecStart=/bin/sh -c '. /lib/dracut-lib.sh; SNAPNAME="$(getarg bootfs.rollback)"; exec @sbindir@/zfs rollback -Rf "${BOOTFS}@${SNAPNAME:-%v}"'
RemainAfterExit=yes RemainAfterExit=yes

View File

@ -9,6 +9,6 @@ ConditionKernelCommandLine=bootfs.snapshot
[Service] [Service]
# ${BOOTFS} should have been set by zfs-env-bootfs.service # ${BOOTFS} should have been set by zfs-env-bootfs.service
Type=oneshot Type=oneshot
ExecStartPre=/bin/sh -c 'test -n "${BOOTFS}"' ExecStartPre=/bin/test -n ${BOOTFS}
ExecStart=-/bin/sh -c '. /lib/dracut-lib.sh; SNAPNAME="$(getarg bootfs.snapshot)"; exec @sbindir@/zfs snapshot "${BOOTFS}@${SNAPNAME:-%v}"' ExecStart=-/bin/sh -c '. /lib/dracut-lib.sh; SNAPNAME="$(getarg bootfs.snapshot)"; exec @sbindir@/zfs snapshot "${BOOTFS}@${SNAPNAME:-%v}"'
RemainAfterExit=yes RemainAfterExit=yes