Take II: [master/rhel7-branch] Auto-load ks.cfg if OEMDRV volume available. (#1057271)

Vratislav Podzimek vpodzime at redhat.com
Wed Jul 29 07:18:37 UTC 2015


On Wed, 2015-07-22 at 15:36 -0400, Samantha N. Bueno wrote:
> This checks if there are any OEMDRV labelled storage volumes available--
> if yes, load a ks.cfg file from that.
> 
> This should only happen if a user has not manually specified a ks=
> option themselves.
> 
> Additionally, this checks for a boot arg inst.ks=none, to explicitly
> disable autoloading of ks.cfg from any detected OEMDRV volumes.
> 
> Resolves: rhbz#1057271
> ---
>  dracut/kickstart-genrules.sh | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/dracut/kickstart-genrules.sh b/dracut/kickstart-genrules.sh
> index 3b83d6c..b5823f9 100755
> --- a/dracut/kickstart-genrules.sh
> +++ b/dracut/kickstart-genrules.sh
> @@ -24,4 +24,10 @@ case "${kickstart%%:*}" in
>      bd) # bd:<dev>:<path> - biospart (TODO... if anyone uses this anymore)
>          warn "inst.ks: can't get kickstart - biospart (bd:) isn't supported yet"
>      ;;
> +    "")
> +        if [ -z "$kickstart" -a $(getarg ks= inst.ks=) != "none" ]; then
Per Adam's report, the second part of this condition should probably
look like:

x$(getarg ks= inst.ks=) != "xnone"

but I thought that getarg handles that and returns "none" exactly in
those cases that could cause such issues. If it returns an empty string,
this could be reduced to:

if [ -z "$kickstart" -a -z "$(getarg ks= inst.ks=)"]; then

-- 
Vratislav Podzimek

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



More information about the anaconda-patches mailing list