mkinitrd unification across distributions
 help / color / mirror / Atom feed
* [PATCH] dracut: don't skip zero-length string outfile argument
@ 2011-03-28 22:52 Amadeusz Żołnowski
       [not found] ` <1301352736-5715-1-git-send-email-aidecoe-2qtfh70TtYba5EbDDlwbIw@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Amadeusz Żołnowski @ 2011-03-28 22:52 UTC (permalink / raw)
  To: initramfs-u79uwXL29TY76Z2rM5mHXA; +Cc: Amadeusz Żołnowski

When '' was passed as outfile, dracut generated name with following
pattern:

  /boot/initramfs-$kernel

With commit 486a1b9324d6fc7bc534d8147d64b8b259692c46 dracut skips ''
argument.
---
 dracut |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/dracut b/dracut
index 6b67dc0..e7d0990 100755
--- a/dracut
+++ b/dracut
@@ -188,6 +188,7 @@ push_arg() {
 }
 
 kernel="unset"
+outfile="unset"
 verbosity_mod_l=0
 
 while (($# > 0)); do
@@ -237,7 +238,7 @@ while (($# > 0)); do
                        ;;
         -*) printf "\nUnknown option: %s\n\n" "$1" >&2; usage; exit 1;;
         *) 
-            if ! [[ $outfile ]]; then
+            if [[ $outfile = "unset" ]]; then
                 outfile=$1
             elif [[ $kernel = "unset" ]]; then
                 kernel=$1
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCHv2] dracut: don't skip zero-length string outfile argument
       [not found] ` <1301352736-5715-1-git-send-email-aidecoe-2qtfh70TtYba5EbDDlwbIw@public.gmane.org>
@ 2011-03-28 23:21   ` Amadeusz Żołnowski
  2011-03-28 23:22   ` [PATCH] " Amadeusz Żołnowski
  1 sibling, 0 replies; 4+ messages in thread
From: Amadeusz Żołnowski @ 2011-03-28 23:21 UTC (permalink / raw)
  To: initramfs-u79uwXL29TY76Z2rM5mHXA; +Cc: Amadeusz Żołnowski

When '' was passed as outfile, dracut generated name with following
pattern:

  /boot/initramfs-$kernel

With commit 486a1b9324d6fc7bc534d8147d64b8b259692c46 dracut skips ''
argument.
---
 dracut |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dracut b/dracut
index 6b67dc0..c16b222 100755
--- a/dracut
+++ b/dracut
@@ -237,7 +237,7 @@ while (($# > 0)); do
                        ;;
         -*) printf "\nUnknown option: %s\n\n" "$1" >&2; usage; exit 1;;
         *) 
-            if ! [[ $outfile ]]; then
+            if ! [[ ${outfile+x} ]]; then
                 outfile=$1
             elif [[ $kernel = "unset" ]]; then
                 kernel=$1
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] dracut: don't skip zero-length string outfile argument
       [not found] ` <1301352736-5715-1-git-send-email-aidecoe-2qtfh70TtYba5EbDDlwbIw@public.gmane.org>
  2011-03-28 23:21   ` [PATCHv2] " Amadeusz Żołnowski
@ 2011-03-28 23:22   ` Amadeusz Żołnowski
  2011-03-29  8:27     ` Harald Hoyer
  1 sibling, 1 reply; 4+ messages in thread
From: Amadeusz Żołnowski @ 2011-03-28 23:22 UTC (permalink / raw)
  To: initramfs

[-- Attachment #1: Type: text/plain, Size: 220 bytes --]

Excerpts from Amadeusz Żołnowski's message of Tue Mar 29 00:52:16 +0200 2011:
> +outfile="unset"

This is bad for file.
-- 
Amadeusz Żołnowski

PGP key fpr: C700 CEDE 0C18 212E 49DA  4653 F013 4531 E1DB FAB5

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] dracut: don't skip zero-length string outfile argument
  2011-03-28 23:22   ` [PATCH] " Amadeusz Żołnowski
@ 2011-03-29  8:27     ` Harald Hoyer
  0 siblings, 0 replies; 4+ messages in thread
From: Harald Hoyer @ 2011-03-29  8:27 UTC (permalink / raw)
  To: Amadeusz Żołnowski; +Cc: initramfs

Am 29.03.2011 01:22, schrieb Amadeusz Żołnowski:
> Excerpts from Amadeusz Żołnowski's message of Tue Mar 29 00:52:16 +0200 2011:
>> +outfile="unset"
> 
> This is bad for file.

used this:

diff --git a/dracut b/dracut
index 6b67dc0..0324ac5 100755
--- 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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-03-29  8:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-28 22:52 [PATCH] dracut: don't skip zero-length string outfile argument Amadeusz Żołnowski
     [not found] ` <1301352736-5715-1-git-send-email-aidecoe-2qtfh70TtYba5EbDDlwbIw@public.gmane.org>
2011-03-28 23:21   ` [PATCHv2] " Amadeusz Żołnowski
2011-03-28 23:22   ` [PATCH] " Amadeusz Żołnowski
2011-03-29  8:27     ` Harald Hoyer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox