]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
fix(dracut.sh): omission is an addition to other omissions in conf files
authorJóhann B. Guðmundsson <johannbg@gmail.com>
Wed, 31 Mar 2021 19:17:43 +0000 (19:17 +0000)
committerHarald Hoyer <harald@hoyer.xyz>
Mon, 12 Apr 2021 07:18:25 +0000 (09:18 +0200)
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).

dracut.sh

index b71db7dda29467c745e198c655f0c232b292d6ad..0fdcbc4b1df6802fb47d3b3a905b7dac67bed006 100755 (executable)
--- a/dracut.sh
+++ b/dracut.sh
@@ -936,6 +936,7 @@ export SYSTEMCTL=${SYSTEMCTL:-systemctl}
 
 # 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[*]} "
@@ -945,7 +946,6 @@ export SYSTEMCTL=${SYSTEMCTL:-systemctl}
 
 # 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[*]}"