diff --git a/contrib/dracut/90zfs/zfs-rollback-bootfs.service.in b/contrib/dracut/90zfs/zfs-rollback-bootfs.service.in index bdc2469432..477b64f2b7 100644 --- a/contrib/dracut/90zfs/zfs-rollback-bootfs.service.in +++ b/contrib/dracut/90zfs/zfs-rollback-bootfs.service.in @@ -9,6 +9,6 @@ ConditionKernelCommandLine=bootfs.rollback [Service] # ${BOOTFS} should have been set by zfs-env-bootfs.service 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}"' RemainAfterExit=yes diff --git a/contrib/dracut/90zfs/zfs-snapshot-bootfs.service.in b/contrib/dracut/90zfs/zfs-snapshot-bootfs.service.in index 6ea13850c3..8eae04adfb 100644 --- a/contrib/dracut/90zfs/zfs-snapshot-bootfs.service.in +++ b/contrib/dracut/90zfs/zfs-snapshot-bootfs.service.in @@ -9,6 +9,6 @@ ConditionKernelCommandLine=bootfs.snapshot [Service] # ${BOOTFS} should have been set by zfs-env-bootfs.service 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}"' RemainAfterExit=yes