mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-26 03:09:34 +03:00
remove pools without a bootfs from BOOTFS variable
Use the same method used in zfs-load-key. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Llewelyn Trahaearn <WoefulDerelict@GMail.com> Signed-off-by: Matthew Thode <mthode@mthode.org> Closes #7089
This commit is contained in:
parent
bee7e4ff12
commit
1d8a71b603
@ -14,7 +14,7 @@ Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
ExecStartPre=/sbin/modprobe zfs
|
||||
ExecStart=@sbindir@/zpool import -c @sysconfdir@/zfs/zpool.cache -aN
|
||||
ExecStartPost=/bin/bash -c "/usr/bin/systemctl set-environment BOOTFS=$(@sbindir@/zpool list -H -o bootfs)"
|
||||
ExecStartPost=/bin/bash -c "/bin/systemctl set-environment BOOTFS=$(@sbindir@/zpool list -H -o bootfs | /bin/awk '$1 != \"-\" {print; exit}')"
|
||||
|
||||
[Install]
|
||||
WantedBy=zfs-import.target
|
||||
|
@ -13,7 +13,7 @@ Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
ExecStartPre=/sbin/modprobe zfs
|
||||
ExecStart=@sbindir@/zpool import -aN -o cachefile=none
|
||||
ExecStartPost=/bin/bash -c "/usr/bin/systemctl set-environment BOOTFS=$(@sbindir@/zpool list -H -o bootfs)"
|
||||
ExecStartPost=/bin/bash -c "/bin/systemctl set-environment BOOTFS=$(@sbindir@/zpool list -H -o bootfs | /bin/awk '$1 != \"-\" {print; exit}')"
|
||||
|
||||
[Install]
|
||||
WantedBy=zfs-import.target
|
||||
|
Loading…
Reference in New Issue
Block a user