Blame 0003-dracut-don-t-skip-zero-length-string-outfile-argumen.patch

Harald Hoyer 27e50d
From dbf381f7fb369bd6336272847da882d8ef0e5a30 Mon Sep 17 00:00:00 2001
Harald Hoyer 27e50d
From: =?UTF-8?q?Amadeusz=20=C5=BBo=C5=82nowski?= <aidecoe@aidecoe.name>
Harald Hoyer 27e50d
Date: Tue, 29 Mar 2011 01:21:56 +0200
Harald Hoyer d97cfa
Subject: [PATCH] dracut: don't skip zero-length string outfile argument
Harald Hoyer 27e50d
Harald Hoyer 27e50d
When '' was passed as outfile, dracut generated name with following
Harald Hoyer 27e50d
pattern:
Harald Hoyer 27e50d
Harald Hoyer 27e50d
  /boot/initramfs-$kernel
Harald Hoyer 27e50d
Harald Hoyer 27e50d
With commit 486a1b9324d6fc7bc534d8147d64b8b259692c46 dracut skips ''
Harald Hoyer 27e50d
argument.
Harald Hoyer 27e50d
---
Harald Hoyer 27e50d
 dracut |    2 +-
Harald Hoyer 27e50d
 1 files changed, 1 insertions(+), 1 deletions(-)
Harald Hoyer 27e50d
Harald Hoyer 27e50d
diff --git a/dracut b/dracut
Harald Hoyer 27e50d
index 6b67dc0..c16b222 100755
Harald Hoyer 27e50d
--- a/dracut
Harald Hoyer 27e50d
+++ b/dracut
Harald Hoyer 27e50d
@@ -237,7 +237,7 @@ while (($# > 0)); do
Harald Hoyer 27e50d
                        ;;
Harald Hoyer 27e50d
         -*) printf "\nUnknown option: %s\n\n" "$1" >&2; usage; exit 1;;
Harald Hoyer 27e50d
         *) 
Harald Hoyer 27e50d
-            if ! [[ $outfile ]]; then
Harald Hoyer 27e50d
+            if ! [[ ${outfile+x} ]]; then
Harald Hoyer 27e50d
                 outfile=$1
Harald Hoyer 27e50d
             elif [[ $kernel = "unset" ]]; then
Harald Hoyer 27e50d
                 kernel=$1