[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
are posix-shell-compliant continuation lines valid/supported, or not, i
From: |
PGNet Dev |
Subject: |
are posix-shell-compliant continuation lines valid/supported, or not, in /etc/default/grub ? |
Date: |
Thu, 19 Mar 2020 14:19:59 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 |
a recent grub package update, in ubuntu 18LTS, is breaking /etc/default/grub by
mangling/overwriting users' entries, in the specific case of using continuation
lines in the file/config. and, subsequently, the upgrade process on these
servers.
as stated clearly at
https://www.gnu.org/software/grub/manual/grub/html_node/Simple-configuration.html#Simple-configuration-handling
"...
The file /etc/default/grub controls the operation of grub-mkconfig. It
is sourced by a shell script, and so must be valid POSIX shell input; normally,
it will just be a sequence of ‘KEY=value’ lines, but if the value contains
spaces or other special characters then it must be quoted
..."
per POSIX
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_02_01
"...
Escape Character (Backslash)
A <backslash> that is not quoted shall preserve the literal value of
the following character, with the exception of a <newline>. If a <newline>
follows the <backslash>, the shell shall interpret this as line continuation.
The <backslash> and <newline> shall be removed before splitting the input into
tokens. Since the escaped <newline> is removed entirely from the input and is
not replaced by any white space, it cannot serve as a token separator.
..."
all that's to say that continuation lines appear to be supported in
posix-shell-compliant /etc/default/grub
they've been in use here, on 100s of servers, in grub configs for ages.
with grub 2.04 on other, non Ubu OS, it continues to work fine.
re: the use of continuation lines, ubu dev states that
"Regardless of what the POSIX spec says, this is highly unusual abuse
of POSIX shell semantics, and I do not see a need to support it"
it'd be useful/helpful to get clear on what the 'official' grub project support
for use of posix-shell-compliant continuation lines is ...
are they 'supported' as valid use in /etc/default/grub, or not?
also useful to know/understand whether any grub update can/should mangle a
user's /etc/default/grub. allowed? expected?
thx!
- are posix-shell-compliant continuation lines valid/supported, or not, in /etc/default/grub ?,
PGNet Dev <=
- Re: are posix-shell-compliant continuation lines valid/supported, or not, in /etc/default/grub ?, Mike Gilbert, 2020/03/19
- Re: are posix-shell-compliant continuation lines valid/supported, or not, in /etc/default/grub ?, Dimitri John Ledkov, 2020/03/19
- Re: are posix-shell-compliant continuation lines valid/supported, or not, in /etc/default/grub ?, PGNet Dev, 2020/03/19
- Re: are posix-shell-compliant continuation lines valid/supported, or not, in /etc/default/grub ?, Dimitri John Ledkov, 2020/03/19
- Re: are posix-shell-compliant continuation lines valid/supported, or not, in /etc/default/grub ?, Eli Schwartz, 2020/03/19
- Re: are posix-shell-compliant continuation lines valid/supported, or not, in /etc/default/grub ?, PGNet Dev, 2020/03/19
- Re: are posix-shell-compliant continuation lines valid/supported, or not, in /etc/default/grub ?, PGNet Dev, 2020/03/20
Re: are posix-shell-compliant continuation lines valid/supported, or not, in /etc/default/grub ?, Eli Schwartz, 2020/03/19