]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
dracut: don't skip zero-length string outfile argument
authorHarald Hoyer <harald@redhat.com>
Tue, 29 Mar 2011 08:25:24 +0000 (10:25 +0200)
committerHarald Hoyer <harald@redhat.com>
Tue, 29 Mar 2011 08:25:24 +0000 (10:25 +0200)
When '' was passed as outfile, dracut generated name with following
pattern:

  /boot/initramfs-${kernel}.img

With commit 486a1b9324d6fc7bc534d8147d64b8b259692c46 dracut skips ''
argument.

dracut

diff --git a/dracut b/dracut
index 6b67dc0392aa0528c63cecf4bdaf7e8552dae949..0324ac531782657c2794a3d71e6378c477170970 100755 (executable)
--- a/dracut
+++ b/dracut
@@ -237,8 +237,9 @@ while (($# > 0)); do
                        ;;
         -*) printf "\nUnknown option: %s\n\n" "$1" >&2; usage; exit 1;;
         *) 
-            if ! [[ $outfile ]]; then
+            if ! [[ $outfile_set ]]; then
                 outfile=$1
+                outfile_set=y
             elif [[ $kernel = "unset" ]]; then
                 kernel=$1
             else