aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/dracut
diff options
context:
space:
mode:
authorgregory-lee-bartholomew <[email protected]>2022-08-12 16:28:15 -0500
committerGitHub <[email protected]>2022-08-12 14:28:15 -0700
commitd22dd77c4d4556373b995121412c4abac02bcf8a (patch)
tree52af68308155525b9677c84f4b33f47a76d777c5 /contrib/dracut
parente713b69e519437af05f88b9db623022dfba69f6d (diff)
contrib: dracut: zfs-snapshot-bootfs: exit status fix
When the zfs-snapshot-bootfs service attempts to create a snapshot that already exists, the exit status of the command is non-zero and the service reports failed to the systemd service manager. This is a common occurrence if bootfs.snapshot is left set on the kernel command line and it should not be considered a failure. This service was originally set to ignore this error by prefixing the command with - on the ExecStart line, but the leading - appears to have been dropped in #13359. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Gregory Bartholomew <[email protected]> Closes #13769
Diffstat (limited to 'contrib/dracut')
-rw-r--r--contrib/dracut/90zfs/zfs-snapshot-bootfs.service.in2
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/dracut/90zfs/zfs-snapshot-bootfs.service.in b/contrib/dracut/90zfs/zfs-snapshot-bootfs.service.in
index befd163b6..9e73d1a78 100644
--- a/contrib/dracut/90zfs/zfs-snapshot-bootfs.service.in
+++ b/contrib/dracut/90zfs/zfs-snapshot-bootfs.service.in
@@ -8,5 +8,5 @@ ConditionKernelCommandLine=bootfs.snapshot
[Service]
Type=oneshot
-ExecStart=/bin/sh -c '. /lib/dracut-zfs-lib.sh; decode_root_args || exit; [ "$root" = "zfs:AUTO" ] && root="$BOOTFS"; SNAPNAME="$(getarg bootfs.snapshot)"; exec @sbindir@/zfs snapshot "$root@${SNAPNAME:-%v}"'
+ExecStart=-/bin/sh -c '. /lib/dracut-zfs-lib.sh; decode_root_args || exit; [ "$root" = "zfs:AUTO" ] && root="$BOOTFS"; SNAPNAME="$(getarg bootfs.snapshot)"; exec @sbindir@/zfs snapshot "$root@${SNAPNAME:-%v}"'
RemainAfterExit=yes