mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-25 02:49:32 +03:00
dracut: support mountpoint=legacy for root dataset
Support mountpoint=legacy for the root dataset in the dracut zfs support scripts. mountpoint=/ or mountpoint=/sysroot also works. Change zfs-env-bootfs.service to add zfsutil to BOOTFSFLAGS only for root datasets with mountpoint != legacy. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Signed-off-by: Rafael Kitover <rkitover@gmail.com> Closes #15149
This commit is contained in:
parent
895cb689d3
commit
95649854ba
@ -12,11 +12,12 @@ ExecStart=/bin/sh -c '
|
||||
decode_root_args || exit 0; \
|
||||
[ "$root" = "zfs:AUTO" ] && root="$(@sbindir@/zpool list -H -o bootfs | grep -m1 -vFx -)"; \
|
||||
rootflags="$(getarg rootflags=)"; \
|
||||
case ",$rootflags," in \
|
||||
*,zfsutil,*) ;; \
|
||||
,,) rootflags=zfsutil ;; \
|
||||
*) rootflags="zfsutil,$rootflags" ;; \
|
||||
esac; \
|
||||
[ "$(@sbindir@/zfs get -H -o value mountpoint "$root")" = legacy ] || \
|
||||
case ",$rootflags," in \
|
||||
*,zfsutil,*) ;; \
|
||||
,,) rootflags=zfsutil ;; \
|
||||
*) rootflags="zfsutil,$rootflags" ;; \
|
||||
esac; \
|
||||
exec systemctl set-environment BOOTFS="$root" BOOTFSFLAGS="$rootflags"'
|
||||
|
||||
[Install]
|
||||
|
Loading…
Reference in New Issue
Block a user