We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dd7e0f9 commit 7ca1a92Copy full SHA for 7ca1a92
common/system/grub_menu_make_accessible.sh
@@ -0,0 +1,25 @@
1
+#! /usr/bin/env sh
2
+
3
+GRUB_MENU_ACCESSIBLE="$1"
4
5
+set -x
6
7
+GRUB_CONFIG="/etc/default/grub"
8
9
+echo "Show full GRUB config before"
10
+cat $GRUB_CONFIG
11
12
+if [ "$GRUB_MENU_ACCESSIBLE" = "True" ]; then
13
+ sed --in-place "s/GRUB_TIMEOUT_STYLE=hidden/GRUB_TIMEOUT_STYLE=menu/" $GRUB_CONFIG
14
+ sed --in-place "s/GRUB_TIMEOUT=0/GRUB_TIMEOUT=40/" $GRUB_CONFIG
15
+else
16
+ sed --in-place "s/GRUB_TIMEOUT_STYLE=menu/GRUB_TIMEOUT_STYLE=hidden/" $GRUB_CONFIG
17
+ sed --in-place "s/GRUB_TIMEOUT=30/GRUB_TIMEOUT=0/" $GRUB_CONFIG
18
+fi
19
20
+echo "Show relevant settings after:"
21
+grep "TIMEOUT_STYLE" $GRUB_CONFIG
22
+grep "GRUB_TIMEOUT=" $GRUB_CONFIG
23
24
+# Now update GRUB with the new settings
25
+update-grub
0 commit comments