From b8d9679f3644c813f7aa6db5b9c978b88758049a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=BD=D0=B0=D0=B1?= Date: Wed, 26 Jan 2022 14:42:13 +0100 Subject: [PATCH] contrib: dracut: zfs-{rollback,snapshot}-bootfs: don't shell for test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Brian Behlendorf Signed-off-by: Ahelenia ZiemiaƄska Closes #13017 --- contrib/dracut/90zfs/zfs-rollback-bootfs.service.in | 2 +- contrib/dracut/90zfs/zfs-snapshot-bootfs.service.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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