public inbox for initramfs@vger.kernel.org
 help / color / mirror / Atom feed
From: "Milan P. Gandhi" <mgandhi-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
Subject: [PATCH] dracut: Verify multipath config_dir option
Date: Tue, 21 Jan 2020 17:38:34 +0530	[thread overview]
Message-ID: <20200121120834.GA23866@machine1> (raw)

The 90multipath/module-setup.sh file currently does not check the
dm-multipath config_dir option. This option in multipath.conf file is
used to specify a custom directory/path that contains the multipath
configuration files. It's default value is /etc/multipath/conf.d

Currently install function of module-setup.sh has hardcoded the above
path, but users could change it with config_dir option. So, adding a
command to get the directory specified with config_dir option and add
these configuration files to the initial ram disk image.

Signed-off-by: Milan P. Gandhi <mgandhi-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
 modules.d/90multipath/module-setup.sh | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/modules.d/90multipath/module-setup.sh b/modules.d/90multipath/module-setup.sh
index 1f6a55ec..f7c521c1 100755
--- a/modules.d/90multipath/module-setup.sh
+++ b/modules.d/90multipath/module-setup.sh
@@ -78,6 +78,9 @@ install() {
         }
     }
 
+    # Include multipath configuration files from path specified with config_dir
+    config_dir=`/usr/sbin/multipath -t|grep -i config_dir|awk '{print $2}'|sed -e 's/^"//' -e 's/"$//'`/*
+
     inst_multiple -o  \
         dmsetup \
         kpartx \
@@ -90,7 +93,7 @@ install() {
         /etc/xdrdevices.conf \
         /etc/multipath.conf \
         /etc/multipath/* \
-        /etc/multipath/conf.d/*
+        $config_dir
 
     [[ $hostonly ]] && [[ $hostonly_mode = "strict" ]] && {
         for_each_host_dev_and_slaves_all add_hostonly_mpath_conf
-- 
2.20.1


             reply	other threads:[~2020-01-21 12:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-21 12:08 Milan P. Gandhi [this message]
2020-01-21 13:02 ` [PATCH] dracut: Verify multipath config_dir option Dracut GitHub Import Bot
2020-01-29  9:49 ` Martin Wilck
     [not found]   ` <2c0c0f100442edd43b10085fa47177b54cd6d0c9.camel-IBi9RG/b67k@public.gmane.org>
2020-01-31  7:58     ` Milan P. Gandhi
2020-01-31  8:35       ` Martin Wilck
     [not found]         ` <cc660dff208809a5511ab837f4d781d8faeae442.camel-IBi9RG/b67k@public.gmane.org>
2020-02-03 11:49           ` Milan P. Gandhi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200121120834.GA23866@machine1 \
    --to=mgandhi-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
    --cc=harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox