[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH OSSTEST V2] ts-debian-hvm-install: use text installer frontend
Factor out di_installcmdline_base in Debian.pm and use that in ts-debian-hvm-install. This should improve readability of d-i log in various Debian HVM testcases. Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx> Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> Cc: Ian Campbell <ian.campbell@xxxxxxxxxx> --- Per: https://www.debian.org/releases/stable/amd64/apbs02.html.en I didn't see "preseed" on that page so I left that one untouched. --- Osstest/Debian.pm | 31 ++++++++++++++++++++----------- ts-debian-hvm-install | 9 +++++++-- 2 files changed, 27 insertions(+), 13 deletions(-) diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm index ab09abb..4f2b584 100644 --- a/Osstest/Debian.pm +++ b/Osstest/Debian.pm @@ -36,6 +36,7 @@ BEGIN { preseed_base preseed_create preseed_hook_command preseed_hook_installscript + di_installcmdline_base di_installcmdline_core ); %EXPORT_TAGS = ( ); @@ -398,6 +399,23 @@ END our %preseed_cmds; # $preseed_cmds{$di_key}[]= $cmd +sub di_installcmdline_base($;@) { + my ($tho, %xopts) = @_; + my @cl = qw( + auto=true + hw-detect/load_firmware=false + DEBCONF_DEBUG=5 + ); + my $difront = get_host_property($tho,'DIFrontend','text'); + push @cl, ("DEBIAN_FRONTEND=$difront"); + + my $debconf_priority= $xopts{DebconfPriority}; + push @cl, "debconf/priority=$debconf_priority" + if defined $debconf_priority; + + return @cl +} + sub di_installcmdline_core ($$;@) { my ($tho, $ps_url, %xopts) = @_; @@ -405,24 +423,15 @@ sub di_installcmdline_core ($$;@) { my $netcfg_interface= get_host_property($tho,'interface force','auto'); - my @cl= qw( - auto=true preseed - hw-detect/load_firmware=false - DEBCONF_DEBUG=5 - ); - my $difront = get_host_property($tho,'DIFrontend','text'); + my @cl = di_installcmdline_base($tho, %xopts); push @cl, ( - "DEBIAN_FRONTEND=$difront", + "preseed", "hostname=$tho->{Name}", "url=$ps_url", "netcfg/dhcp_timeout=150", "netcfg/choose_interface=$netcfg_interface" ); - my $debconf_priority= $xopts{DebconfPriority}; - push @cl, "debconf/priority=$debconf_priority" - if defined $debconf_priority; - return @cl; } diff --git a/ts-debian-hvm-install b/ts-debian-hvm-install index fec24f7..a9c658a 100755 --- a/ts-debian-hvm-install +++ b/ts-debian-hvm-install @@ -86,18 +86,23 @@ END sub grub_cfg () { + my $cmdline = join ' ' , di_installcmdline_base($gho); + return <<"END"; set default="0" set timeout=5 menuentry 'debian guest auto Install' { - linux /install.amd/vmlinuz console=vga console=ttyS0,115200n8 preseed/file=/preseed.cfg + linux /install.amd/vmlinuz $cmdline console=ttyS0,115200n8 preseed/file=/preseed.cfg initrd /install.amd/initrd.gz } END } sub isolinux_cfg () { + + my $cmdline = join ' ' , di_installcmdline_base($gho); + return <<"END"; default autoinstall prompt 0 @@ -105,7 +110,7 @@ sub isolinux_cfg () { label autoinstall kernel /install.amd/vmlinuz - append video=vesa:ywrap,mtrr vga=788 console=ttyS0,115200n8 preseed/file=/preseed.cfg initrd=/install.amd/initrd.gz + append $cmdline console=ttyS0,115200n8 preseed/file=/preseed.cfg initrd=/install.amd/initrd.gz END } -- 1.7.10.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |