reenabled automatic grub turn off script

This commit is contained in:
2025-12-30 19:55:24 +01:00
parent 8536c2ac5a
commit e290b927a3
2 changed files with 9 additions and 8 deletions

View File

@@ -5,7 +5,7 @@ GRUB_FILE="/etc/default/grub"
# Ensure the file exists before proceeding
if [[ -f "$GRUB_FILE" ]]; then
echo "Updating GRUB timeout to 0..."
# Replace or add the GRUB_TIMEOUT line
if grep -q "^GRUB_TIMEOUT=" "$GRUB_FILE"; then
# Modify existing line
@@ -15,9 +15,8 @@ if [[ -f "$GRUB_FILE" ]]; then
echo "GRUB_TIMEOUT=0" >> "$GRUB_FILE"
fi
grub-mkconfig -o /boot/grub/grub.cfg
sudo grub-mkconfig -o /boot/grub/grub.cfg
echo "GRUB timeout set to 0 and configuration updated."
else
echo "$GRUB_FILE not found!"
echo "$GRUB_FILE not found!"
fi