Skip to content

Commit 1c23277

Browse files
committed
chore: Fix configure-grub action if /etc/default/grub doesn't exist
1 parent 4530bd6 commit 1c23277

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

system_files/desktop/shared/usr/share/ublue-os/just/80-bazzite.just

+2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ _install-system-flatpaks:
1717
configure-grub ACTION="":
1818
#!/usr/bin/bash
1919
source /usr/lib/ujust/ujust.sh
20+
sudo touch /etc/default/grub
2021
GRUB_STATE="$(grep -P "^GRUB_TIMEOUT_STYLE=hidden" /etc/default/grub)"
2122
OPTION={{ ACTION }}
2223
if [ "$GRUB_STATE" == "GRUB_TIMEOUT_STYLE=hidden" ]; then
@@ -37,6 +38,7 @@ configure-grub ACTION="":
3738
OPTION=$(Choose "Hide Grub" "Unhide Grub" "Fix double ostree entry")
3839
fi
3940
if [[ "${OPTION,,}" =~ ^hide ]]; then
41+
grep -q '^GRUB_TIMEOUT=' /etc/default/grub || echo 'GRUB_TIMEOUT=0' | sudo tee -a /etc/default/grub 1>/dev/null
4042
sudo sed -i 's/GRUB_TIMEOUT=5/GRUB_TIMEOUT=0/g' /etc/default/grub
4143
echo 'GRUB_TIMEOUT_STYLE=hidden' | sudo tee -a /etc/default/grub 1>/dev/null
4244
echo 'GRUB_HIDDEN_TIMEOUT=1' | sudo tee -a /etc/default/grub 1>/dev/null

0 commit comments

Comments
 (0)