1[Unit] 2Description=Snapshot bootfs just before it is mounted 3Requisite=zfs-import.target 4After=zfs-import.target dracut-pre-mount.service 5Before=dracut-mount.service 6DefaultDependencies=no 7ConditionKernelCommandLine=bootfs.snapshot 8ConditionEnvironment=BOOTFS 9 10[Service] 11Type=oneshot 12ExecStart=-/bin/sh -c '. /lib/dracut-lib.sh; SNAPNAME="$(getarg bootfs.snapshot)"; exec @sbindir@/zfs snapshot "$BOOTFS@${SNAPNAME:-%v}"' 13RemainAfterExit=yes 14