On May 11, 2015 2:16 PM, "Olaf Hering" <o...@aepfle.de> 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
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to