]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
only install /etc/modprobe.d for hostonly
authorHarald Hoyer <harald@redhat.com>
Tue, 16 Oct 2012 11:15:21 +0000 (13:15 +0200)
committerHarald Hoyer <harald@redhat.com>
Tue, 16 Oct 2012 11:15:21 +0000 (13:15 +0200)
modules.d/90kernel-modules/module-setup.sh
modules.d/95nfs/module-setup.sh

index ad2b7c183851501626ce1d257e42bb696b95262e..4f37977b30e031bc096fcb40348bf7e46a0cd83a 100755 (executable)
@@ -69,8 +69,8 @@ installkernel() {
 }
 
 install() {
-    [ -f /etc/modprobe.conf ] && dracut_install /etc/modprobe.conf
-    dracut_install -o /{etc,lib}/modprobe.d/*.conf
+    dracut_install -o /lib/modprobe.d/*.conf
+    [[ $hostonly ]] && dracut_install -o /etc/modprobe.d/*.conf /etc/modprobe.conf
     inst_hook cmdline 01 "$moddir/parse-kernel.sh"
     inst_simple "$moddir/insmodpost.sh" /sbin/insmodpost.sh
 }
index 1bba871d90238b2124a3d73663436cbda9c36b99..3ddf186838c5bbaee3144919b75006b2aea18a6e 100755 (executable)
@@ -38,6 +38,7 @@ install() {
     if [ -f /lib/modprobe.d/nfs.conf ]; then
         dracut_install /lib/modprobe.d/nfs.conf
     else
+        [ -d $initdir/etc/modprobe.d/ ] || mkdir $initdir/etc/modprobe.d
         echo "alias nfs4 nfs" > $initdir/etc/modprobe.d/nfs.conf
     fi