Don't assume that the presence of /etc/default/grub or

/etc/default/grub.d/*.cfg means that any particular item is set in it
(LP: #1199731).
This commit is contained in:
Colin Watson 2013-07-10 12:01:27 +01:00
parent 590b05435c
commit 50f74fa5bb
3 changed files with 7 additions and 4 deletions

3
debian/changelog vendored
View File

@ -9,6 +9,9 @@ grub2 (2.00-15) UNRELEASED; urgency=low
* Make the description of grub-firmware-qemu a little more generic, rather
than assuming that bochsbios provides qemu's default BIOS image (closes:
#714277).
* Don't assume that the presence of /etc/default/grub or
/etc/default/grub.d/*.cfg means that any particular item is set in it
(LP: #1199731).
[ Debconf translations ]
* Hungarian (Dr. Nagy Elemér Károly).

5
debian/config.in vendored
View File

@ -38,13 +38,14 @@ esac
for x in /etc/default/grub /etc/default/grub.d/*.cfg ; do
if [ -e "$x" ]; then
DEFAULT_FOUND="yes"
. "$x"
fi
done
if [ "$DEFAULT_FOUND" = "yes" ]; then
if [ "${GRUB_CMDLINE_LINUX+set}" = set ]; then
db_set grub2/linux_cmdline "$GRUB_CMDLINE_LINUX"
fi
if [ "${GRUB_CMDLINE_LINUX_DEFAULT+set}" = set ]; then
db_set grub2/linux_cmdline_default "$GRUB_CMDLINE_LINUX_DEFAULT"
fi

3
debian/postinst.in vendored
View File

@ -284,11 +284,10 @@ config_item()
{
for x in /etc/default/grub /etc/default/grub.d/*.cfg; do
if [ -e "$x" ]; then
DEFAULT_FOUND="yes"
. "$x"
fi
done
if [ "$DEFAULT_FOUND" = "yes" ]; then
if [ "$(eval echo "\${$1+set}")" = set ]; then
eval echo "\$$1"
else
return