diff --git a/debian/changelog b/debian/changelog index 04ab6ba73..970f8783b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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). diff --git a/debian/config.in b/debian/config.in index 5cefedcbd..ec3806efa 100644 --- a/debian/config.in +++ b/debian/config.in @@ -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 diff --git a/debian/postinst.in b/debian/postinst.in index c3d37fc08..2fdcc5dfc 100644 --- a/debian/postinst.in +++ b/debian/postinst.in @@ -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