]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
Fix regressions with dracut-install with kernel modules
authorHarald Hoyer <harald@redhat.com>
Wed, 13 Apr 2016 09:47:20 +0000 (11:47 +0200)
committerHarald Hoyer <harald@redhat.com>
Wed, 13 Apr 2016 09:47:20 +0000 (11:47 +0200)
Make sure, the same modules are installed as before.

install/dracut-install.c
modules.d/50drm/module-setup.sh
modules.d/90kernel-modules/module-setup.sh
modules.d/90kernel-network-modules/module-setup.sh
modules.d/90multipath/module-setup.sh
modules.d/95iscsi/module-setup.sh

index a20e06cabed03db3575a31ee7ece09bedf816eca..c246201dd8a553a8bf8045b88f0e0d86fdeb3de4 100644 (file)
@@ -1202,6 +1202,7 @@ static int install_module(struct kmod_module *mod)
         if (!check_module_path(path) || !check_module_symbols(mod)) {
                 log_debug("No symbol or patch match for '%s'", path);
                 return 0;
+                //return -ENOENT;
         }
 
         log_debug("dracut_install '%s'", path);
@@ -1295,7 +1296,7 @@ static int install_modules(int argc, char **argv)
                         }
                         kmod_list_foreach(itr, modlist) {
                                 mod = kmod_module_get_module(itr);
-                                ret = install_module(mod);
+                                ret += install_module(mod);
                         }
                         kmod_module_unref_list(modlist);
                         modlist = 0;
@@ -1364,13 +1365,13 @@ static int install_modules(int argc, char **argv)
                                 }
                                 kmod_list_foreach(itr, modlist) {
                                         mod = kmod_module_get_module(itr);
-                                        ret = install_module(mod);
+                                        ret += install_module(mod);
                                         kmod_module_unref(mod);
                                 }
                                 kmod_module_unref_list(modlist);
                                 modlist = 0;
 #else
-                                ret = install_module(mod_o);
+                                ret += install_module(mod_o);
                                 kmod_module_unref(mod_o);
 #endif
 
@@ -1413,7 +1414,7 @@ static int install_modules(int argc, char **argv)
                         }
                         kmod_list_foreach(itr, modlist) {
                                 mod = kmod_module_get_module(itr);
-                                ret = install_module(mod);
+                                ret += install_module(mod);
                                 kmod_module_unref(mod);
                         }
                         kmod_module_unref_list(modlist);
index e0b295968e8cb864e9d7f0b5f568c474be5da51b..661dde99adf5da25e6504a14a09458821d8bafd1 100755 (executable)
@@ -34,8 +34,8 @@ installkernel() {
     if [[ $hostonly ]]; then
         for i in /sys/bus/{pci/devices,soc/devices/soc?}/*/modalias; do
             [[ -e $i ]] || continue
-            if hostonly="" dracut_instmods -s "drm_crtc_init" $(<$i) 2>/dev/null; then
-                if strstr $(modinfo -F filename $(<$i) 2>/dev/null) radeon.ko; then
+            if hostonly="" dracut_instmods -s "drm_crtc_init" -S "iw_handler_get_spy" $(<$i) 2>/dev/null; then
+                if strstr "$(modinfo -F filename $(<$i) 2>/dev/null)" radeon.ko; then
                     hostonly='' instmods amdkfd
                 fi
             fi
index e97d59884067f70b68af6362b42d6120e401949c..c30715d2bffb3d32097b1283c1eaa2eebc583f77 100755 (executable)
@@ -7,20 +7,21 @@ installkernel() {
     if [[ -z $drivers ]]; then
         hostonly='' instmods \
             sr_mod sd_mod scsi_dh ata_piix hid_generic unix \
-            ehci-hcd ehci-pci \
+            ehci-hcd ehci-pci ehci-platform \
             ohci-hcd ohci-pci \
             uhci-hcd \
             xhci-hcd xhci-pci xhci-plat-hcd \
-            ehci-platform
-
-        instmods \
             "=drivers/hid" \
             "=drivers/input/serio" \
             "=drivers/input/keyboard" \
+            "=drivers/usb/storage" \
+            ${NULL}
+
+        instmods \
             yenta_socket scsi_dh_rdac scsi_dh_emc scsi_dh_alua \
             atkbd i8042 usbhid firewire-ohci pcmcia hv-vmbus \
             virtio virtio_blk virtio_ring virtio_pci virtio_scsi \
-            "=drivers/pcmcia" =ide "=drivers/usb/storage"
+            "=drivers/pcmcia" =ide
 
         if [[ "$(uname -p)" == arm* ]]; then
             # arm specific modules
@@ -33,13 +34,13 @@ installkernel() {
                 ${NULL}
         fi
 
-        dracut_instmods -s "${_blockfuncs}" "=drivers"
+        dracut_instmods -o -s "${_blockfuncs}" "=drivers"
 
         # if not on hostonly mode, install all known filesystems,
         # if the required list is not set via the filesystems variable
         if ! [[ $hostonly ]]; then
             if [[ -z $filesystems ]]; then
-                dracut_instmods -P ".*/(kernel/fs/nfs|kernel/fs/nfsd|kernel/fs/lockd)/.*" '=fs'
+                dracut_instmods -o -P ".*/(kernel/fs/nfs|kernel/fs/nfsd|kernel/fs/lockd)/.*" '=fs'
             fi
         else
             hostonly='' instmods "${host_fs_types[@]}"
index c004ff87c99c5b3dff2d793dda796fd5a9350ab9..11fbab99e88a156597563bcb901795ccf6eb0f79 100755 (executable)
@@ -21,7 +21,7 @@ installkernel() {
         _s390drivers="=drivers/s390/net"
     fi
 
-    dracut_instmods -P ".*${_unwanted_drivers}.*" -s "$_net_drivers" "=drivers/net" ${_s390drivers:+"$_s390drivers"}
+    dracut_instmods -o -P ".*${_unwanted_drivers}.*" -s "$_net_drivers" "=drivers/net" ${_s390drivers:+"$_s390drivers"}
 
     #instmods() will take care of hostonly
     instmods \
index 27817bd08e7c8b518aa61c2a0c40f4f7e9626676..0af777d96959d1263735e0a9691a07891c85e3c6 100755 (executable)
@@ -58,7 +58,7 @@ installkernel() {
         _s390drivers="=drivers/s390/scsi"
     fi
 
-    hostonly='' dracut_instmods -s "$_funcs" "=drivers/scsi" "=drivers/md" ${_s390drivers:+"$_s390drivers"}
+    hostonly='' dracut_instmods -o -s "$_funcs" "=drivers/scsi" "=drivers/md" ${_s390drivers:+"$_s390drivers"}
 }
 
 # called by dracut
index 203e313affd5f93a32b90e8148fb1a1146473821..04937b5b879cf103021d720d87fc5b2b0bafe878 100755 (executable)
@@ -166,7 +166,7 @@ installkernel() {
         _s390drivers="=drivers/s390/scsi"
     fi
 
-    dracut_instmods -s "$_funcs" "=drivers/scsi" ${_s390drivers:+"$_s390drivers"}
+    dracut_instmods -o -s "$_funcs" "=drivers/scsi" ${_s390drivers:+"$_s390drivers"}
 
 }