From 1643af4578f091976b3d25b5eb13bc676d838a81 Mon Sep 17 00:00:00 2001 From: Vineeth Vijayan Date: Wed, 19 Oct 2022 10:37:53 +0200 Subject: [PATCH] zdev: dracut: modifiy the module-setup.sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Export and import the configurations with zdev:early on the site-specific configurations as well. Filter the site-specific configurations by attribute "zdev:early" and import the output to the corresponding sites. Note that --site parameter does not work with the device type. Reviewed-by: Peter Oberparleiter Signed-off-by: Vineeth Vijayan Signed-off-by: Jan Höppner --- zdev/dracut/95zdev/module-setup.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/zdev/dracut/95zdev/module-setup.sh b/zdev/dracut/95zdev/module-setup.sh index e0cb9829..e1f00c31 100644 --- a/zdev/dracut/95zdev/module-setup.sh +++ b/zdev/dracut/95zdev/module-setup.sh @@ -55,9 +55,22 @@ install() { chzdev --export - --persistent --by-attrib "zdev:early=1" --quiet \ --type 2>/dev/null >> "$_tempfile" + # Obtain early device configuration for site-specific settings + for (( site=0; site<10; site++ )) + do + chzdev --export - --persistent --by-attrib "zdev:early=1" --site $site \ + --quiet 2>/dev/null >> "$_tempfile" + done + # Apply via --import to prevent other devices from being configured chzdev --import "$_tempfile" --persistent --base "/etc=$initdir/etc" \ --yes --quiet --no-root-update --force >/dev/null + # Apply site-specific configurations via --import + for (( site=0; site<10; site++ )) + do + chzdev --import "$_tempfile" --persistent --base "/etc=$initdir/etc" \ + --site $site --yes --quiet --no-root-update --force >/dev/null + done rm -f "$_tempfile"