From 6b4eb8a46f56195daaefe12f6b623019db0fb782 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Fri, 21 Aug 2020 16:43:46 +0200 Subject: Keep timeout value when it's 0 (mga#27158) Rationale: setVarsInSh() excludes lines where value is 0, undefined or empty string --- perl-install/bootloader.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'perl-install/bootloader.pm') diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm index 8cd392b0e..c09b12330 100644 --- a/perl-install/bootloader.pm +++ b/perl-install/bootloader.pm @@ -2071,7 +2071,8 @@ sub write_grub2_sysconfig { $conf{GRUB_DISABLE_RECOVERY} = 'false'; # for 'failsafe' entry $conf{GRUB_DEFAULT} //= 'saved'; # for default entry but do not overwrite user choice $conf{GRUB_SAVEDEFAULT} //= 'true'; # for default entry but do not overwrite user choice - $conf{GRUB_TIMEOUT} = $bootloader->{timeout}; + # special case so that setVarsInSh() doesn't emit the line when timeout is 0 + $conf{GRUB_TIMEOUT} = $bootloader->{timeout} eq 0 ? "0 " : $bootloader->{timeout}; renamef($f, $f . ($o_backup_extension || '.old')); setVarsInSh($f, \%conf); } -- cgit v1.2.1