summaryrefslogtreecommitdiffstats
path: root/master/debian/grub.cfg_400.patch
blob: 1ac8d44e671995b920e36c1cff2e5720aeb5445e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Index: b/util/grub-mkconfig.in
===================================================================
--- a/util/grub-mkconfig.in
+++ b/util/grub-mkconfig.in
@@ -293,6 +293,10 @@
   esac
 done
 
+if [ "x${grub_cfg}" != "x" ] && ! grep "^password " ${grub_cfg}.new >/dev/null; then
+  chmod 444 ${grub_cfg}.new || true
+fi
+
 if test "x${grub_cfg}" != "x" ; then
   if ! ${grub_script_check} ${grub_cfg}.new; then
     echo "Syntax errors are detected in generated GRUB config file." >&2