[pve-devel] [PATCH installer 2/2] serial install: fix console parameter parsing

Stoiko Ivanov s.ivanov at proxmox.com
Tue Nov 14 18:31:48 CET 2023


The regex matching in Proxmox::Install::Config was blindly copied from
above - so the other parameters are also likely to not get recognized
if they are the last on the cmdline

Signed-off-by: Stoiko Ivanov <s.ivanov at proxmox.com>
---
 Proxmox/Install.pm        | 2 +-
 Proxmox/Install/Config.pm | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Proxmox/Install.pm b/Proxmox/Install.pm
index a289037..66adb2d 100644
--- a/Proxmox/Install.pm
+++ b/Proxmox/Install.pm
@@ -1154,7 +1154,7 @@ _EOD
 	update_progress(0.8, 0.95, 1, "make system bootable");
 	my $console_param='';
 	if (my $console = Proxmox::Install::Config::get_console()) {
-	    my $console_param="console=$console";;
+	    $console_param="console=$console";
 	    my $console_snippet = "GRUB_CMDLINE_LINUX=\"\$GRUB_CMDLINE_LINUX $console_param\"";
 	    file_write_all("$targetdir/etc/default/grub.d/console.cfg", $console_snippet);
 	}
diff --git a/Proxmox/Install/Config.pm b/Proxmox/Install/Config.pm
index 55e53c7..5e80255 100644
--- a/Proxmox/Install/Config.pm
+++ b/Proxmox/Install/Config.pm
@@ -43,7 +43,7 @@ my sub parse_kernel_cmdline {
 	}
     }
 
-    if ($cmdline =~ m/console=(\S+)[\s\n]/i) {
+    if ($cmdline =~ m/console=(\S+)[\s\n]?/i) {
 	    $cfg->{console} = $1;
     }
 
-- 
2.39.2






More information about the pve-devel mailing list