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

Bug#931499: Is sourcing /usr/share/initramfs-tools/scripts/functions forbidden in hook scripts?



I just noticed that the line in Debian 9

"$quiet" = "y"

was explicitly changed into

"${quiet?}" = "y"

in Debian 10, so I wonder whether this was really a regression by
mistake, or rather a deliberate way to break all existing hook scripts
which source /usr/share/initramfs-tools/scripts/functions because they
must not do this for some reason.

If this should be the case, that fact should be mentioned in the man
page of initramfs-tools.

The man page currently does not explicitly suggest sourcing this shell
snippet, but it does not advise against it either.

And it worked fine in Debian 9.

Now many of my hook scripts are broken because of this regression in
Debian 10.

I fixed the problem for now with the following kludge:

---------------
$ cat /etc/initramfs-tools/conf.d/quiet-fix-tifgasefdz3c41npwum8msjt7
# Without this file, every initramfs hook which uses one of the log_*
# functions will fail with the message "quiet: parameter not set".
#
# This effect was introduced by upgrading from Debian "stretch" to "buster".

: ${quiet:=n}
export quiet
---------------

but of course this is not a clean solution.


Reply to: