From 7f792c1202fa113af9be478d2990b7956e758e6d Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 10 Aug 2011 20:07:13 +0200 Subject: [PATCH] fixed symbolic link creation in the initramfs Resolves: rhbz#728863 --- ...sh-fixed-getargs-for-empty-arguments.patch | 36 +++++++++++++++++++ dracut.spec | 9 +++-- 2 files changed, 42 insertions(+), 3 deletions(-) create mode 100644 0040-dracut-lib.sh-fixed-getargs-for-empty-arguments.patch diff --git a/0040-dracut-lib.sh-fixed-getargs-for-empty-arguments.patch b/0040-dracut-lib.sh-fixed-getargs-for-empty-arguments.patch new file mode 100644 index 0000000..8dda50d --- /dev/null +++ b/0040-dracut-lib.sh-fixed-getargs-for-empty-arguments.patch @@ -0,0 +1,36 @@ +From d609c64209af738540f629bccecdef8c6bafa91d Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Wed, 10 Aug 2011 20:03:21 +0200 +Subject: [PATCH] dracut-lib.sh: fixed getargs() for empty arguments + +--- + modules.d/99base/dracut-lib.sh | 14 +++++++++++--- + 1 files changed, 11 insertions(+), 3 deletions(-) + +diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh +index 80c1f84..dec5d92 100755 +--- a/modules.d/99base/dracut-lib.sh ++++ b/modules.d/99base/dracut-lib.sh +@@ -142,11 +142,19 @@ _dogetargs() { + } + + getargs() { +- local _val +- unset _val + set +x ++ local _val _nval ++ unset _val ++ unset _nval + while [ $# -gt 0 ]; do +- _val="$_val $(_dogetargs $1)" ++ _nval=$(_dogetargs $1) ++ if [ -n "$_nval" ]; then ++ if [ -n "$_val" ]; then ++ _val="$_val $_nval" ++ else ++ _val="$_nval" ++ fi ++ fi + shift + done + if [ -n "$_val" ]; then diff --git a/dracut.spec b/dracut.spec index 13d1c88..63ad094 100644 --- a/dracut.spec +++ b/dracut.spec @@ -8,7 +8,7 @@ Name: dracut Version: 011 -Release: 40.git20110810 +Release: 41.git20110810 Summary: Initramfs generator using udev %if 0%{?fedora} @@ -61,7 +61,7 @@ Patch36: 0036-dracut.spec-add-97masterkey-98ecryptfs-98integrity.patch Patch37: 0037-dracut-functions-create-relative-symlinks-for-librar.patch Patch38: 0038-99base-init-use-udevadm-control-to-set-the-logging-p.patch Patch39: 0039-dracut-lib.sh-getarg-echo-with-to-prevent-wildcard-s.patch - +Patch40: 0040-dracut-lib.sh-fixed-getargs-for-empty-arguments.patch BuildArch: noarch BuildRequires: dash bash @@ -234,7 +234,7 @@ This package contains tools to assemble the local initrd and host configuration. %patch37 -p1 %patch38 -p1 %patch39 -p1 - +%patch40 -p1 %build make @@ -368,6 +368,9 @@ rm -rf $RPM_BUILD_ROOT %dir /var/lib/dracut/overlay %changelog +* Wed Aug 10 2011 Harald Hoyer 011-41.git20110810 +- fixed getargs() for empty args + * Wed Aug 10 2011 Harald Hoyer 011-40.git20110810 - fixed symbolic link creation in the initramfs Resolves: rhbz#728863