dracut.sh: only save $kernel_cmdline, if set
authorHarald Hoyer <harald@redhat.com>
Fri, 19 Oct 2012 09:09:38 +0000 (11:09 +0200)
committerHarald Hoyer <harald@redhat.com>
Fri, 19 Oct 2012 09:09:38 +0000 (11:09 +0200)
dracut.sh

index e160641..aab850e 100755 (executable)
--- a/dracut.sh
+++ b/dracut.sh
@@ -937,7 +937,7 @@ fi
 if [[ $kernel_only != yes ]]; then
     (( ${#install_items[@]} > 0 )) && dracut_install  ${install_items[@]}
 
-    echo "$kernel_cmdline" >> "${initdir}/etc/cmdline.d/01-default.conf"
+    [[ $kernel_cmdline ]] && echo "$kernel_cmdline" >> "${initdir}/etc/cmdline.d/01-default.conf"
 
     while pop fstab_lines line; do
         echo "$line 0 0" >> "${initdir}/etc/fstab"