2020-05-30 04:16:08 +00:00
|
|
|
[Unit]
|
|
|
|
Description=Snapshot bootfs just before it is mounted
|
|
|
|
Requisite=zfs-import.target
|
2022-04-04 22:19:38 +00:00
|
|
|
After=zfs-import.target dracut-pre-mount.service
|
2020-05-30 04:16:08 +00:00
|
|
|
Before=dracut-mount.service
|
|
|
|
DefaultDependencies=no
|
|
|
|
ConditionKernelCommandLine=bootfs.snapshot
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
Type=oneshot
|
2022-04-04 22:19:38 +00:00
|
|
|
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}"'
|
2020-05-30 04:16:08 +00:00
|
|
|
RemainAfterExit=yes
|