mirror of
https://git.proxmox.com/git/grub2
synced 2025-08-02 20:39:48 +00:00
debian/{postinst,config}.in: Don't fail if /etc/default/grub.d
configuration snippets exist, but /etc/default/grub does not.
This commit is contained in:
parent
92b1137f35
commit
7a110bd08d
7
debian/changelog
vendored
7
debian/changelog
vendored
@ -1,3 +1,10 @@
|
||||
grub2 (2.00-11) UNRELEASED; urgency=low
|
||||
|
||||
* debian/{postinst,config}.in: Don't fail if /etc/default/grub.d
|
||||
configuration snippets exist, but /etc/default/grub does not.
|
||||
|
||||
-- Adam Conrad <adconrad@debian.org> Fri, 04 Jan 2013 13:11:42 -0700
|
||||
|
||||
grub2 (2.00-10) experimental; urgency=low
|
||||
|
||||
* Support parallel builds.
|
||||
|
14
debian/config.in
vendored
14
debian/config.in
vendored
@ -36,14 +36,14 @@ case @PACKAGE@ in
|
||||
;;
|
||||
esac
|
||||
|
||||
if test -e /etc/default/grub ; then
|
||||
. /etc/default/grub
|
||||
for x in /etc/default/grub.d/*.cfg ; do
|
||||
if [ -e "$x" ]; then
|
||||
. "$x"
|
||||
fi
|
||||
done
|
||||
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
|
||||
db_set grub2/linux_cmdline "$GRUB_CMDLINE_LINUX"
|
||||
db_set grub2/linux_cmdline_default "$GRUB_CMDLINE_LINUX_DEFAULT"
|
||||
fi
|
||||
|
18
debian/postinst.in
vendored
18
debian/postinst.in
vendored
@ -281,15 +281,17 @@ get_mountpoint()
|
||||
|
||||
config_item()
|
||||
{
|
||||
if [ -f /etc/default/grub ]; then
|
||||
. /etc/default/grub || return
|
||||
for x in /etc/default/grub.d/*.cfg; do
|
||||
if [ -e "$x" ]; then
|
||||
. "$x"
|
||||
fi
|
||||
done
|
||||
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
|
||||
eval echo "\$$1"
|
||||
else
|
||||
return
|
||||
fi
|
||||
eval echo "\$$1"
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
|
Loading…
Reference in New Issue
Block a user