From 0a10805ae15423c7eb781bcabfc32905c1785413 Mon Sep 17 00:00:00 2001 From: fehlix Date: Wed, 16 Oct 2024 23:22:54 +0200 Subject: [PATCH] enable GRUB_TIMEOUT change even if not set in /etc/default/grub --- debian/changelog | 7 +++++++ mainwindow.cpp | 4 +++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 099b0f9..b480785 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +mx-boot-options (24.9+dev) mx; urgency=medium + + * Fix: enable grub-timeout to be changed, even if GRUB_TIMEOUT does + not exist within /etc/default/grub + + -- fehlix Wed, 16 Oct 2024 17:17:50 -0400 + mx-boot-options (24.9) mx; urgency=medium * When running Live prompt to change live boot options or chroot to an installed system diff --git a/mainwindow.cpp b/mainwindow.cpp index 0c25d44..0ffd3aa 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -956,7 +956,9 @@ void MainWindow::pushApply_clicked() disableGrubLine("GRUB_SAVEDEFAULT=true"); } - replaceGrubArg("GRUB_TIMEOUT", QString::number(ui->spinBoxTimeout->value())); + if (!replaceGrubArg("GRUB_TIMEOUT", QString::number(ui->spinBoxTimeout->value()))) { + addGrubLine("GRUB_TIMEOUT=" + QString::number(ui->spinBoxTimeout->value())); + } } if (splash_changed) {