mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-27 11:29:36 +03:00
d22dd77c4d
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 <behlendorf1@llnl.gov> Signed-off-by: Gregory Bartholomew <gregory.lee.bartholomew@gmail.com> Closes #13769
13 lines
486 B
SYSTEMD
13 lines
486 B
SYSTEMD
[Unit]
|
|
Description=Snapshot bootfs just before it is mounted
|
|
Requisite=zfs-import.target
|
|
After=zfs-import.target dracut-pre-mount.service
|
|
Before=dracut-mount.service
|
|
DefaultDependencies=no
|
|
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}"'
|
|
RemainAfterExit=yes
|