[master/rhel7-branch] Fix error with OEMDRV ks auto-load check. (#1057271)

Vratislav Podzimek vpodzime at redhat.com
Thu Jul 30 06:56:52 UTC 2015


On Wed, 2015-07-29 at 14:26 -0400, Samantha N. Bueno wrote:
> getarg returns an empty string if there is no argument to fetch; this
> causes a problem since I originally checked the value against "none".
> Oops.
> 
> Related: rhbz#1057271
> ---
>  dracut/kickstart-genrules.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/dracut/kickstart-genrules.sh b/dracut/kickstart-genrules.sh
> index b5823f9..3dd7f89 100755
> --- a/dracut/kickstart-genrules.sh
> +++ b/dracut/kickstart-genrules.sh
> @@ -25,7 +25,7 @@ case "${kickstart%%:*}" in
>          warn "inst.ks: can't get kickstart - biospart (bd:) isn't supported yet"
>      ;;
>      "")
> -        if [ -z "$kickstart" -a $(getarg ks= inst.ks=) != "none" ]; then
> +        if [ -z "$kickstart" -a -z $(getarg ks= inst.ks=) ]; then
Now that I see it as a patch I realize it's wrong. The newly added '-z'
has to be replaced with '-n' because if I understand it correctly, this
should test $kickstart for being empty, but $(getarg ks= inst.ks=)
returning a non-empty value. With that change it would look good to
me. :)

-- 
Vratislav Podzimek

Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic



More information about the anaconda-patches mailing list