]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
add parameter to specify additional kernel modules to include
authorHarald Hoyer <harald@redhat.com>
Wed, 9 Sep 2009 15:02:37 +0000 (17:02 +0200)
committerHarald Hoyer <harald@redhat.com>
Wed, 9 Sep 2009 15:02:37 +0000 (17:02 +0200)
--add-drivers for dracut
add_drivers for dracut.conf

dracut
dracut.8
dracut.conf
modules.d/90kernel-modules/installkernel

diff --git a/dracut b/dracut
index 1d74316d0a1955eeaf4216fa464f14a55fcdcba1..b19df1e1e5efc54c587a5ac8cced1a2bddacfa8f 100755 (executable)
--- a/dracut
+++ b/dracut
@@ -34,7 +34,9 @@ Creates initial ramdisk images for preloading modules
   -o, --omit [LIST]     Omit a space-separated list of dracut modules.
   -a, --add [LIST]      Add a space-separated list of dracut modules.
   -d, --drivers [LIST]  Specify a space-separated list of kernel modules to
-                         include in the initramfs.
+                        exclusively include in the initramfs.
+  --add-drivers [LIST]  Specify a space-separated list of kernel 
+                        modules to add to the initramfs.
   -k, --kmoddir [DIR]   Specify the directory, where to look for kernel 
                         modules
   --fwdir [DIR]         Specify additional directories, where to look for 
@@ -69,6 +71,7 @@ while (($# > 0)); do
        -o|--omit) omit_dracutmodules_l="$2"; shift;;
        -a|--add) add_dracutmodules_l="$2"; shift;;
        -d|--drivers) drivers_l="$2"; shift;;
+       --add-drivers) add_drivers_l="$2"; shift;;
        -k|--kmoddir) drivers_dir_l="$2"; shift;;
        --fwdir) fw_dir_l="$2"; shift;;
        --kernel-only) kernel_only="yes"; nokernel="no";;
@@ -107,6 +110,7 @@ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:$PATH
 [[ $omit_dracutmodules_l ]] && omit_dracutmodules=$omit_dracutmodules_l
 [[ $add_dracutmodules_l ]] && add_dracutmodules="$add_dracutmodules $add_dracutmodules_l"
 [[ $drivers_l ]] && drivers=$drivers_l
+[[ $add_drivers_l ]] && add_drivers=$add_drivers_l
 [[ $drivers_dir_l ]] && drivers_dir=$drivers_dir_l
 [[ $fw_dir_l ]] && fw_dir=$fw_dir_l
 [[ $do_strip_l ]] && do_strip=$do_strip_l
@@ -158,7 +162,8 @@ trap 'rm -rf "$initdir"' 0 # clean up after ourselves no matter how we die.
 chmod 755 "$initdir"
 
 export initdir hookdirs dsrc dracutmodules drivers \
-    fw_dir drivers_dir debug beverbose no_kernel kernel_only
+    fw_dir drivers_dir debug beverbose no_kernel kernel_only \
+    add_drivers
 
 if [[ $kernel_only != yes ]]; then
     # Create some directory structure first
index 5ac33f9c02771c8670bb77ffc8bf146e08a0a702..b0547d953d309da68404614d25caa957dd46a4ee 100644 (file)
--- a/dracut.8
+++ b/dracut.8
@@ -28,7 +28,9 @@ omit a space-separated list of dracut modules.
 add a space-separated list of dracut modules.
 .TP
 .BR \-d ", " \-\-drivers " \fILIST\fR"
-specify a space-separated list of kernel modules to include in the initramfs.
+specify a space-separated list of kernel modules to exclusively include in the initramfs.
+.BR \-\-add-drivers " \fILIST\fR"
+specify a space-separated list of kernel modules to add to the initramfs.
 .TP
 .BR \-k ", " \-\-kmoddir " \fI{DIR}\fR   
 specify the directory, where to look for kernel modules
index f4e4daa827039808553493c2a36aaa9edb7aa6f8..73d064fedec66081d8a3242b6ecf04476ded646d 100644 (file)
@@ -6,8 +6,8 @@
 # Dracut modules to omit
 #omit_dracutmodules=""
 
-# Additional kernel modules to install
-#drivers=""
+# additional kernel modules to the default
+#add_drivers=""
 
 # build initrd only to boot current hardware
 #hostonly="-h"
index 92e3301aaf3ab923bd80a1c3fc469b2dc24c2324..461e5ef4d6016089df6ef3663ef122b7ad270e80 100755 (executable)
@@ -18,4 +18,6 @@ else
   instmods $drivers
 fi
 
+[[ $add_drivers ]] && instmods $add_drivers
+
 instmods scsi_wait_scan