mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-11-17 01:51:00 +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
019dea0a55
commit
b8c9070d09
@ -12,11 +12,12 @@ ExecStart=/bin/sh -c '
|
|||||||
decode_root_args || exit 0; \
|
decode_root_args || exit 0; \
|
||||||
[ "$root" = "zfs:AUTO" ] && root="$(@sbindir@/zpool list -H -o bootfs | grep -m1 -vFx -)"; \
|
[ "$root" = "zfs:AUTO" ] && root="$(@sbindir@/zpool list -H -o bootfs | grep -m1 -vFx -)"; \
|
||||||
rootflags="$(getarg rootflags=)"; \
|
rootflags="$(getarg rootflags=)"; \
|
||||||
case ",$rootflags," in \
|
[ "$(@sbindir@/zfs get -H -o value mountpoint "$root")" = legacy ] || \
|
||||||
*,zfsutil,*) ;; \
|
case ",$rootflags," in \
|
||||||
,,) rootflags=zfsutil ;; \
|
*,zfsutil,*) ;; \
|
||||||
*) rootflags="zfsutil,$rootflags" ;; \
|
,,) rootflags=zfsutil ;; \
|
||||||
esac; \
|
*) rootflags="zfsutil,$rootflags" ;; \
|
||||||
|
esac; \
|
||||||
exec systemctl set-environment BOOTFS="$root" BOOTFSFLAGS="$rootflags"'
|
exec systemctl set-environment BOOTFS="$root" BOOTFSFLAGS="$rootflags"'
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
|
Loading…
Reference in New Issue
Block a user