grub2/debian/patches/grub.cfg_400.patch
2013-11-26 23:27:11 +00:00

16 lines
456 B
Diff

Index: b/util/grub-mkconfig.in
===================================================================
--- a/util/grub-mkconfig.in
+++ b/util/grub-mkconfig.in
@@ -254,6 +254,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
# TRANSLATORS: %s is replaced by filename