grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Parse commandline in grub-xen


From: Vladimir 'phcoder' Serbinenko
Subject: Re: [PATCH] Parse commandline in grub-xen
Date: Mon, 11 May 2015 14:53:40 +0200


On May 11, 2015 2:16 PM, "Olaf Hering" <address@hidden> wrote:
>
> On Mon, May 11, Andrei Borzenkov wrote:
>
> > Either by allowing ${grub.arg.XXX} (not sure if current grammar accepts
> > it) or by adding getarg command, something like
> >
> > getarg --name debug --set debug
>
> What would such format buy us?
>
> > You do not control what arguments grub gets - end use (admin) controls
> > it. You cannot force end user to actually strictly comply with what you
> > expect. As example, grub.cfg you recently submitted has
> >
> > if [ -n "hddev" ]
> >
> > without initializing it first. So administrator setting this variable
> > will unintentionally change behavior of script.
>
> That should have been hdcfg of hddev, thanks for spotting it.
>
> The use of uninitialized vars has to be caught by the script author no?
It never works this way
> Code like that is valid IMO:
>
> set localvar=""
> if [ -n "${whatever}" ];then
>   echo "do whatever implies"
>   set localvar="val"
> fi
> if [ -n "${localvar}" ];then
>   echo "do whatever local things"
> fi
>
>
> Olaf
>
> _______________________________________________
> Grub-devel mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/grub-devel


reply via email to

[Prev in Thread] Current Thread [Next in Thread]