summaryrefslogtreecommitdiff
path: root/user/grub/update-grub
diff options
context:
space:
mode:
authorMax Rees <maxcrees@me.com>2019-08-18 21:46:13 -0500
committerMax Rees <maxcrees@me.com>2019-08-19 13:48:19 -0500
commit3c2ccced9f54ab390c55c89bc3a70923de7f195c (patch)
tree23ea654f30694dd46b6740431b0f9a515bfd84b2 /user/grub/update-grub
parentf06e6ac40a9ff1dadfbc428644a76fdf71aefa74 (diff)
downloadpackages-3c2ccced9f54ab390c55c89bc3a70923de7f195c.tar.gz
packages-3c2ccced9f54ab390c55c89bc3a70923de7f195c.tar.bz2
packages-3c2ccced9f54ab390c55c89bc3a70923de7f195c.tar.xz
packages-3c2ccced9f54ab390c55c89bc3a70923de7f195c.zip
user/grub: add trigger to auto-update configuration
Diffstat (limited to 'user/grub/update-grub')
-rw-r--r--user/grub/update-grub14
1 files changed, 14 insertions, 0 deletions
diff --git a/user/grub/update-grub b/user/grub/update-grub
new file mode 100644
index 000000000..c8c495390
--- /dev/null
+++ b/user/grub/update-grub
@@ -0,0 +1,14 @@
+#!/bin/sh -e
+. /etc/default/grub
+if [ "$ADELIE_MANUAL_CONFIG" -eq 1 ]; then
+ cat >&2 <<-EOF
+ *
+ * You have specified that you are using a manual GRUB configuration.
+ * You must update it yourself.
+ *
+ EOF
+ exit 0
+fi
+
+cp -p /boot/grub/grub.cfg /boot/grub/grub.cfg.update-grub-old
+exec grub-mkconfig -o /boot/grub/grub.cfg