Bug#561593: background image config/handling (plus password handling)

debian at x.ray.net debian at x.ray.net
Fri Dec 18 14:07:08 UTC 2009


Package: grub-pc
Version: 1.98~20091210-1
Tags: patch

hi!

i just received the grub-pc upgrade, to find out that /etc/grub/05_debian_theme now sources /usr/share/desktop-base/grub_background.sh, obviously expecting the grub background image ($WALLPAPER) and grub menu colors ($COLOR_NORMAL and $COLOR_HIGHLIGHT) to be set in there. but grub_background.sh doesn't exist. neither as a file, nor as something i was able to find documented somewhere in the package.
also, for configuration issues, i guess variables like these are (and should be) usually set in /etc/default/grub (like the readme says. and while we're at it, all variables in there have the prefix GRUB_, which is generally a very good idea i guess)?

i don't understand the rationale of /usr/share/desktop-base/grub_background.sh, but even if it's a good idea as some sort of hook, then even if WALLPAPER was set in /etc/default/grub, it would be overwritten in any case. to prevent this, i guess the best solution would be to remove the hardcoded default values from that file, and simply set them as default values in /etc/default/grub resp. /usr/share/grub/default/grub.

while i was at it i also added the following variables to be able to configure grub-menu-passwords:

GRUB_SUPERUSERS="user1 user2 ..."
GRUB_PASSWORD_user1="cryptstring"
...

(can be configured in /etc/default/grub, changed 00_header and grub-mkconfig to handle them)

the attached patches do the following:

- leave grub_background.sh sourcing as it is (assuming it makes some sense), just removing the part setting hardcoded defaults if the file doesn't exist
- rename the variable names to GRUB_ prefixed names as used throughout /etc/default/grub
- add the defaults (as formerly hardcoded in 05_debian_theme) to the default config (/usr/share/grub/default/grub)
- add user/password variables
- make variable names known to grub-mkconfig

kind regards,

	Chris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 00_header.patch
Type: text/x-patch
Size: 563 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-grub-devel/attachments/20091218/68ec476a/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 05_debian_theme.patch
Type: text/x-patch
Size: 1120 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-grub-devel/attachments/20091218/68ec476a/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: grub.patch
Type: text/x-patch
Size: 437 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-grub-devel/attachments/20091218/68ec476a/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: grub-mkconfig.patch
Type: text/x-patch
Size: 538 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-grub-devel/attachments/20091218/68ec476a/attachment-0003.bin>


More information about the Pkg-grub-devel mailing list