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