[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Parse commandline in grub-xen
From: |
Olaf Hering |
Subject: |
Re: [PATCH] Parse commandline in grub-xen |
Date: |
Mon, 11 May 2015 14:15:54 +0200 |
User-agent: |
Mutt/1.5.22.rev6346 (2013-10-29) |
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?
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
- Re: [PATCH] Parse commandline in grub-xen, (continued)
- Re: [PATCH] Parse commandline in grub-xen, Olaf Hering, 2015/05/11
- Re: [PATCH] Parse commandline in grub-xen, Andrei Borzenkov, 2015/05/11
- Re: [PATCH] Parse commandline in grub-xen, Olaf Hering, 2015/05/11
- Re: [PATCH] Parse commandline in grub-xen, Vladimir 'phcoder' Serbinenko, 2015/05/11
- Re: [PATCH] Parse commandline in grub-xen, Olaf Hering, 2015/05/11
- Re: [PATCH] Parse commandline in grub-xen, Vladimir 'phcoder' Serbinenko, 2015/05/11
- Re: [PATCH] Parse commandline in grub-xen, Olaf Hering, 2015/05/11
- Re: [PATCH] Parse commandline in grub-xen, Vladimir 'phcoder' Serbinenko, 2015/05/11
- Re: [PATCH] Parse commandline in grub-xen, Olaf Hering, 2015/05/11
- Re: [PATCH] Parse commandline in grub-xen, Andrei Borzenkov, 2015/05/11
- Re: [PATCH] Parse commandline in grub-xen,
Olaf Hering <=
- Re: [PATCH] Parse commandline in grub-xen, Vladimir 'phcoder' Serbinenko, 2015/05/11
- Re: [PATCH] Parse commandline in grub-xen, Olaf Hering, 2015/05/11
- Re: [PATCH] Parse commandline in grub-xen, Vladimir 'phcoder' Serbinenko, 2015/05/11
- Re: [PATCH] Parse commandline in grub-xen, Andrei Borzenkov, 2015/05/11
- Re: [PATCH] Parse commandline in grub-xen, Olaf Hering, 2015/05/11
- Re: [PATCH] Parse commandline in grub-xen, Vladimir 'phcoder' Serbinenko, 2015/05/11
- Re: [PATCH] Parse commandline in grub-xen, Olaf Hering, 2015/05/12
- Re: [PATCH] Parse commandline in grub-xen, Vladimir 'phcoder' Serbinenko, 2015/05/12
- Re: [PATCH] Parse commandline in grub-xen, Olaf Hering, 2015/05/12
- Re: [PATCH] Parse commandline in grub-xen, Vladimir 'phcoder' Serbinenko, 2015/05/12