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-grub6
1 files changed, 4 insertions, 2 deletions
diff --git a/user/grub/update-grub b/user/grub/update-grub
index c8c495390..d22930bd7 100644
--- a/user/grub/update-grub
+++ b/user/grub/update-grub
@@ -1,6 +1,6 @@
#!/bin/sh -e
. /etc/default/grub
-if [ "$ADELIE_MANUAL_CONFIG" -eq 1 ]; then
+if [ "$ADELIE_MANUAL_CONFIG" = 1 ]; then
cat >&2 <<-EOF
*
* You have specified that you are using a manual GRUB configuration.
@@ -10,5 +10,7 @@ if [ "$ADELIE_MANUAL_CONFIG" -eq 1 ]; then
exit 0
fi
-cp -p /boot/grub/grub.cfg /boot/grub/grub.cfg.update-grub-old
+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