fix: 添加 GRUB timeout=5 防止卡菜单

This commit is contained in:
mango
2026-02-23 09:09:19 +08:00
parent 62e5bfc7d3
commit c486850555

View File

@@ -95,6 +95,15 @@ bash InstallNET.sh $OS_FLAG \
-swap "$MYSWAP" \
$BBR_FLAG
# 修复 GRUB timeout防止卡在菜单
GRUB_CFG="/boot/grub/grub.cfg"
if [ -f "$GRUB_CFG" ]; then
if ! grep -q "^set timeout=" "$GRUB_CFG"; then
sed -i '/^set default=/a set timeout=5' "$GRUB_CFG"
echo -e "${G}已添加 GRUB timeout=5${N}"
fi
fi
echo
echo -e "${Y}重装完成10秒后自动重启...${N}"
for i in $(seq 10 -1 1); do