File 0633-fix-dracut.sh-omission-is-an-addition-to-other-omiss.patch of Package dracut.28355

From b8e57a673d4f6a06a3db53d857d9c9c235931a2a Mon Sep 17 00:00:00 2001
From: Thomas Blume <Thomas.Blume@suse.com>
Date: Wed, 15 Mar 2023 16:00:39 +0100
Subject: [PATCH] fix(dracut.sh): omission is an addition to other omissions in
 conf files

When omitting a module from the command line via -o or --omit
it's expected that it behaves in the same manner as adding a module from the
command line as in it does not overwrite existing omissions of other modules in
configuration file(s).

backported from upstream commit 96c313333d1a4f5e2c524a3a11c5b3aab24afc20
---
 dracut.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dracut.sh b/dracut.sh
index 765d15cb..42355f20 100755
--- a/dracut.sh
+++ b/dracut.sh
@@ -706,6 +706,7 @@ unset NPATH
 
 # these options add to the stuff in the config file
 (( ${#add_dracutmodules_l[@]} )) && add_dracutmodules+=" ${add_dracutmodules_l[@]} "
+(( ${#omit_dracutmodules_l[@]} )) && omit_dracutmodules+="${omit_dracutmodules_l[@]}"
 (( ${#force_add_dracutmodules_l[@]} )) && force_add_dracutmodules+=" ${force_add_dracutmodules_l[@]} "
 (( ${#fscks_l[@]} )) && fscks+=" ${fscks_l[@]} "
 (( ${#add_fstab_l[@]} )) && add_fstab+=" ${add_fstab_l[@]} "
@@ -715,7 +716,6 @@ unset NPATH
 
 # these options override the stuff in the config file
 (( ${#dracutmodules_l[@]} )) && dracutmodules="${dracutmodules_l[@]}"
-(( ${#omit_dracutmodules_l[@]} )) && omit_dracutmodules="${omit_dracutmodules_l[@]}"
 (( ${#filesystems_l[@]} )) && filesystems="${filesystems_l[@]}"
 (( ${#fw_dir_l[@]} )) && fw_dir="${fw_dir_l[@]}"
 (( ${#libdirs_l[@]} ))&& libdirs="${libdirs_l[@]}"
-- 
2.39.2

openSUSE Build Service is sponsored by