mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-26 19:19:32 +03:00
2d434e8ae4
Due to a missing semicolon on the ExecStart line, it wasn't possible to specify the snapshot name on the bootfs.{rollback,snapshot} kernel parameters if the boot dataset name was obtained from the root=zfs:... kernel parameter. Reviewed-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Gregory Bartholomew <gregory.lee.bartholomew@gmail.com> Closes #13585
13 lines
517 B
SYSTEMD
13 lines
517 B
SYSTEMD
[Unit]
|
|
Description=Rollback bootfs just before it is mounted
|
|
Requisite=zfs-import.target
|
|
After=zfs-import.target dracut-pre-mount.service zfs-snapshot-bootfs.service
|
|
Before=dracut-mount.service
|
|
DefaultDependencies=no
|
|
ConditionKernelCommandLine=bootfs.rollback
|
|
|
|
[Service]
|
|
Type=oneshot
|
|
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}"'
|
|
RemainAfterExit=yes
|