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