grub-pc gets confused by variables in /etc/default/grub.d/*.cfg files
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
grub2 (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
I have made a Debian package, that installs a *.cfg file into /etc/default/
GRUB_CMDLINE_
The package runs update-grub in its postinst script.
The idea is, of course, to add "usbcore.
But with every grub-pc update, /etc/default/grub gets changed and every time "usbcore.
When my package gets installed before grub-pc (during a complete re-installation of the system), then /etc/default/grub will contain the following:
GRUB_CMDLINE_
So in this case, the default value ("quiet splash") gets discarded completely.
Is this working as intended? I would assume, that grub-pc should leave the GRUB_CMDLINE_
I also tried a different approach, that is putting a file in /etc/default/
GRUB_CMDLINE_
With this approach it is not possible to build multiple packages that each just add a single parameter to the kernel command line. But for my use-case this would be sufficient, but the value above ("quiet splash usbcore.
So this leads me to believe that the /etc/default/
I think the problem is, that the config maintainer script of the package grub-pc is sourcing /etc/default/grub AND /etc/default/
I think the config script should only source /etc/default/grub, but not /etc/default/
Looking at the config maintainer script, the problem seems exist in all Ubuntu versions from Precise (probably even Quantal, haven't checked that, but IMHO this was when /etc/default/grub.d was introduced) to Wily. I have tested it myself in Precise and Trusty.
summary: |
- grub-pc gets confused by variables /etc/default/grub.d/*.cfg files + grub-pc gets confused by variables in /etc/default/grub.d/*.cfg files |
affects: | grub (Ubuntu) → grub2 (Ubuntu) |
tags: | added: trusty |
Some additional information that might be helpful:
The affected systems get installed and updated automatically, and to have a defined state regarding the configuration files, we have the following setting in /etc/apt/apt.conf:
DPkg::Options {"--force- confnew" ;"--force- confmiss" ;};
So new packages should always install the maintainer version of the configuration file.