fixed symbolic link creation in the initramfs

Resolves: rhbz#728863
This commit is contained in:
Harald Hoyer 2011-08-10 20:07:13 +02:00
parent b0eaf9ef35
commit 7f792c1202
2 changed files with 42 additions and 3 deletions

View File

@ -0,0 +1,36 @@
From d609c64209af738540f629bccecdef8c6bafa91d Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
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

View File

@ -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 <harald@redhat.com> 011-41.git20110810
- fixed getargs() for empty args
* Wed Aug 10 2011 Harald Hoyer <harald@redhat.com> 011-40.git20110810
- fixed symbolic link creation in the initramfs
Resolves: rhbz#728863