summaryrefslogtreecommitdiff
path: root/user/grub/update-grub
diff options
context:
space:
mode:
Diffstat (limited to 'user/grub/update-grub')
-rw-r--r--user/grub/update-grub16
1 files changed, 16 insertions, 0 deletions
diff --git a/user/grub/update-grub b/user/grub/update-grub
new file mode 100644
index 000000000..d22930bd7
--- /dev/null
+++ b/user/grub/update-grub
@@ -0,0 +1,16 @@
+#!/bin/sh -e
+. /etc/default/grub
+if [ "$ADELIE_MANUAL_CONFIG" = 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
+
+if [ -e /boot/grub/grub.cfg ]; then
+ cp -p /boot/grub/grub.cfg /boot/grub/grub.cfg.update-grub-old
+fi
+exec grub-mkconfig -o /boot/grub/grub.cfg