[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
grub-mkconfig - pick local defaults from /etc/default/grub.local
From: |
Amish |
Subject: |
grub-mkconfig - pick local defaults from /etc/default/grub.local |
Date: |
Tue, 16 Jul 2019 09:30:40 +0530 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 |
Hello,
Now-a-days many softwares have 3 levels of configuration.
1) Software's own default configuration
2) Vendor / Distribution specific configuration
3) Administrator's own configuration (mostly called as local configuration)
grub-mkconfig:
1) has own defaults
2) which can be overridden by /etc/default/grub (by vendor / distributions)
3) local config is missing (administrators are expected to modify vendor
config instead)
I am using Arch Linux and they have their own set of defaults placed in
/etc/default/grub
I modify it with my own preferences for grub menu.
But my problem is that everytime Arch Linux makes any modification to
/etc/default/grub, I have to diff-merge or update my changes again.
But if grub-mkconfig also sources /etc/default/grub.local in addition to
/etc/default/grub then Administrators (like me) can have their own
config without need to edit vendor specific configuration file everytime.
It is 3 line addition as follows:
--- grub-mkconfig 2019-07-05 15:44:43.000000000 +0530
+++ grub-mkconfig 2019-07-16 09:13:31.020769527 +0530
@@ -158,6 +158,10 @@
. ${sysconfdir}/default/grub
fi
+if test -f ${sysconfdir}/default/grub.local ; then
+ . ${sysconfdir}/default/grub.local
+fi
+
# XXX: should this be deprecated at some point?
if [ "x${GRUB_TERMINAL}" != "x" ] ; then
GRUB_TERMINAL_INPUT="${GRUB_TERMINAL}"
Please do consider.
Thank you,
Amish.
PS: I had filed feature request to Arch linux but they refused to source
grub.local from /etc/default/grub. They want that everytime they change
the file, administrator should manually handle it. But when you have
15-20 machines to handle, it becomes too much unnecessary work.
- grub-mkconfig - pick local defaults from /etc/default/grub.local,
Amish <=