]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
dracut-functions.sh:install_kmod_with_fw() delay .kernelmodseen
authorHarald Hoyer <harald@redhat.com>
Thu, 1 Mar 2012 16:45:30 +0000 (17:45 +0100)
committerHarald Hoyer <harald@redhat.com>
Thu, 1 Mar 2012 16:45:30 +0000 (17:45 +0100)
first check for omit, then mark the kernel module as seen

when we temporarily omit_drivers, we don't want to mark them as seen.

example: nfs.ko module in kernel-modules, but the nfs module
should be able to load it later on.

dracut-functions.sh

index c7337e9ef870c5359b0d649b494e8690b2a2fcf9..20fc6e14deb312b678388a2eb86b04edf4f94955 100755 (executable)
@@ -980,8 +980,6 @@ install_kmod_with_fw() {
 
     [[ -e "$initdir/.kernelmodseen/${1##*/}" ]] && return 0
 
-    > "$initdir/.kernelmodseen/${1##*/}"
-
     if [[ $omit_drivers ]]; then
         local _kmod=${1##*/}
         _kmod=${_kmod%.ko}
@@ -996,6 +994,8 @@ install_kmod_with_fw() {
         fi
     fi
 
+    > "$initdir/.kernelmodseen/${1##*/}"
+
     inst_simple "$1" "/lib/modules/$kernel/${1##*/lib/modules/$kernel/}" \
         || return $?