2020-05-30 07:16:08 +03:00
|
|
|
[Unit]
|
|
|
|
Description=Rollback bootfs just before it is mounted
|
|
|
|
Requisite=zfs-import.target
|
2022-04-05 01:19:38 +03:00
|
|
|
After=zfs-import.target dracut-pre-mount.service zfs-snapshot-bootfs.service
|
2020-05-30 07:16:08 +03:00
|
|
|
Before=dracut-mount.service
|
|
|
|
DefaultDependencies=no
|
|
|
|
ConditionKernelCommandLine=bootfs.rollback
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
Type=oneshot
|
2022-06-30 02:56:04 +03: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 07:16:08 +03:00
|
|
|
RemainAfterExit=yes
|