2020-05-30 04:16:08 +00:00
|
|
|
[Unit]
|
|
|
|
Description=Rollback bootfs just before it is mounted
|
|
|
|
Requisite=zfs-import.target
|
2022-04-04 22:19:38 +00:00
|
|
|
After=zfs-import.target dracut-pre-mount.service zfs-snapshot-bootfs.service
|
2020-05-30 04:16:08 +00:00
|
|
|
Before=dracut-mount.service
|
|
|
|
DefaultDependencies=no
|
|
|
|
ConditionKernelCommandLine=bootfs.rollback
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
Type=oneshot
|
2022-04-04 22:19:38 +00:00
|
|
|
ExecStart=/bin/sh -c '. /lib/dracut-zfs-lib.sh; decode_root_args || exit; [ "$root" = "zfs:AUTO" ] && root="$BOOTFS" SNAPNAME="$(getarg bootfs.rollback)"; exec @sbindir@/zfs rollback -Rf "$root@${SNAPNAME:-%v}"'
|
2020-05-30 04:16:08 +00:00
|
|
|
RemainAfterExit=yes
|