[Top][All Lists]

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

Re: are posix-shell-compliant continuation lines valid/supported, or not

From: PGNet Dev
Subject: Re: are posix-shell-compliant continuation lines valid/supported, or not, in /etc/default/grub ?
Date: Thu, 19 Mar 2020 18:55:37 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0


On 3/19/20 6:41 PM, Eli Schwartz wrote:
> In general, other distros avoid parsing and rewriting configs because
> this should be the user's responsibility. :p
> The OP should consider that maybe such distros are more stable than Ubuntu?

I do. Where I directly control them, they're in use.  It includes my own spins 
All use Grub.  "Happily". ;-)

Ubu's a not-infrequent reality nonetheless.

> The OP's question is
> "Does the grub project consider /etc/default/grub as a shell-compatible
> file which is sourced, to be the PUBLIC INTERFACE of this configuration
> file?"

yep. well restated.

> The conclusion is simple enough: if you are going to automatically
> rewrite this grub file,

i'd thought that non-mangling of it would be a reasonable position; that, 
apparently, is not a mandate, iiuc.

tbh, i'm not clear _why_ it's being written at all.  i agree with the "this 
should be the user's responsibility", and would add "only the user's 

but that's me.  well, maybe not JUST me ...

> you must do so using a parser engine that
> implements POSIX shell and knows how to properly tokenize and rewrite
> the full range of language features permitted by POSIX shell.
> Doing otherwise is YOLO, rash, buggy, and prone to breakage as
> demonstrated by the OP's bug report.
> If a downstream project making use of grub, then goes ahead and calls
> the use of backslash escapes for the very simple purpose of line
> continuation across multiple lines (of all the things one might do in a
> POSIX sh formatted configuration file, this is pretty tame), an issue of
> "highly unusual abuse of POSIX shell semantics", this is pretty bad I
> have to say.


> Just my $0.02 as a distro person (not a grub dev).

heh. cheap at twice the price!  ;-)


reply via email to

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