mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-11-18 10:21:01 +03:00
9747310cc1
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #11898
15 lines
491 B
SYSTEMD
15 lines
491 B
SYSTEMD
[Unit]
|
|
Description=Snapshot bootfs just before it is mounted
|
|
Requisite=zfs-import.target
|
|
After=zfs-import.target
|
|
Before=dracut-mount.service
|
|
DefaultDependencies=no
|
|
ConditionKernelCommandLine=bootfs.snapshot
|
|
|
|
[Service]
|
|
# ${BOOTFS} should have been set by zfs-env-bootfs.service
|
|
Type=oneshot
|
|
ExecStartPre=/bin/sh -c 'test -n "${BOOTFS}"'
|
|
ExecStart=-/bin/sh -c '. /lib/dracut-lib.sh; SNAPNAME="$(getarg bootfs.snapshot)"; @sbindir@/zfs snapshot "${BOOTFS}@${SNAPNAME:-%v}"'
|
|
RemainAfterExit=yes
|