2020-05-30 04:16:08 +00:00
|
|
|
[Unit]
|
|
|
|
Description=Rollback bootfs just before it is mounted
|
|
|
|
Requisite=zfs-import.target
|
|
|
|
After=zfs-import.target zfs-snapshot-bootfs.service
|
|
|
|
Before=dracut-mount.service
|
|
|
|
DefaultDependencies=no
|
|
|
|
ConditionKernelCommandLine=bootfs.rollback
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
# ${BOOTFS} should have been set by zfs-env-bootfs.service
|
|
|
|
Type=oneshot
|
2022-01-26 13:42:13 +00:00
|
|
|
ExecStartPre=/bin/test -n ${BOOTFS}
|
2021-05-13 04:21:35 +00:00
|
|
|
ExecStart=/bin/sh -c '. /lib/dracut-lib.sh; SNAPNAME="$(getarg bootfs.rollback)"; exec @sbindir@/zfs rollback -Rf "${BOOTFS}@${SNAPNAME:-%v}"'
|
2020-05-30 04:16:08 +00:00
|
|
|
RemainAfterExit=yes
|