From 9f2fd4682d50c83b3e05a8acccebcde0cb202c0e Mon Sep 17 00:00:00 2001 From: theQuestionmark <17354322+theQuestionmark@users.noreply.github.com> Date: Sun, 12 Jun 2022 01:35:47 +0200 Subject: [PATCH] initramfs: dracut - Change to some make-variables Change /etc/ to sysconfdir-variable and add default-config to dracut initrd-image Signed-off-by: theQuestionmark <17354322+theQuestionmark@users.noreply.github.com> --- contrib/dracut/02zfsexpandknowledge/module-setup.sh.in | 4 ++-- contrib/dracut/90zfs/module-setup.sh.in | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/contrib/dracut/02zfsexpandknowledge/module-setup.sh.in b/contrib/dracut/02zfsexpandknowledge/module-setup.sh.in index d9beb47199dc..2fa25c57e9fc 100755 --- a/contrib/dracut/02zfsexpandknowledge/module-setup.sh.in +++ b/contrib/dracut/02zfsexpandknowledge/module-setup.sh.in @@ -93,8 +93,8 @@ check() { # shellcheck disable=SC2154 if [ -n "$hostonly" ]; then - if [ -f /etc/default/zfs ]; then - . /etc/default/zfs + if [ -f @sysconfdir@/default/zfs ]; then + . @sysconfdir@/default/zfs if [ -n "$ZFS_INITRD_ADDITIONAL_DATASETS" ]; then for add_zpool in $ZFS_INITRD_ADDITIONAL_DATASETS; do add_mps+=$(find_add_zpool_mps "$add_zpool") diff --git a/contrib/dracut/90zfs/module-setup.sh.in b/contrib/dracut/90zfs/module-setup.sh.in index 81d7d2abe496..e81861ae66b5 100755 --- a/contrib/dracut/90zfs/module-setup.sh.in +++ b/contrib/dracut/90zfs/module-setup.sh.in @@ -64,7 +64,8 @@ install() { # -o ensures there is no error upon absence of these files inst_multiple -o -H \ "@sysconfdir@/zfs/zpool.cache" \ - "@sysconfdir@/zfs/vdev_id.conf" + "@sysconfdir@/zfs/vdev_id.conf" \ + "@sysconfdir@/default/zfs" # Synchronize initramfs and system hostid if ! inst_simple -H @sysconfdir@/hostid; then