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:
parent
34ec548980
commit
b8d9679f36
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue