]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
dracut.sh: do not install some files in installkernel
authorHarald Hoyer <harald@redhat.com>
Wed, 22 Feb 2012 15:11:19 +0000 (16:11 +0100)
committerHarald Hoyer <harald@redhat.com>
Wed, 22 Feb 2012 15:14:23 +0000 (16:14 +0100)
/etc/cmdline.d
/etc/fstab

dracut.sh

index ba49fe3b94b1af967b2eb0ea0d8ba065118e6ba3..8208c926ef45629edd6eabba2472c0f0f733d941 100755 (executable)
--- a/dracut.sh
+++ b/dracut.sh
@@ -672,7 +672,9 @@ else
     done
 fi
 
-mkdir -p "${initdir}/etc/cmdline.d"
+if [[ $kernel_only != yes ]]; then
+    mkdir -p "${initdir}/etc/cmdline.d"
+fi
 
 mods_to_load=""
 # check all our modules to see if they should be sourced.
@@ -737,20 +739,20 @@ while pop include_src src && pop include_target tgt; do
     fi
 done
 
-for item in $install_items; do
-    dracut_install -o "$item"
-done
-unset item
+if [[ $kernel_only != yes ]]; then
+    for item in $install_items; do
+        dracut_install -o "$item"
+    done
+    unset item
 
-while pop fstab_lines line; do
-    echo "$line 0 0" >> "${initdir}/etc/fstab"
-done
+    while pop fstab_lines line; do
+        echo "$line 0 0" >> "${initdir}/etc/fstab"
+    done
 
-for f in $add_fstab; do
-    cat $f >> "${initdir}/etc/fstab"
-done
+    for f in $add_fstab; do
+        cat $f >> "${initdir}/etc/fstab"
+    done
 
-if [[ $kernel_only != yes ]]; then
     # make sure that library links are correct and up to date
     for f in /etc/ld.so.conf /etc/ld.so.conf.d/*; do
         [[ -f $f ]] && inst_simple "$f"