contrib: dracut: fix race with root=zfs:dset when necessities required
[zfs.git] / contrib / dracut / 90zfs / zfs-rollback-bootfs.service.in
blob68fdcb1f323efb3419c55f65fc5b62176a748082
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
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