[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [OSSTEST v6 07/24] Debian: add preseed_create_guest helper
Creates a preseed file suitable for use in a PV guest Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx> --- v5: preseed_ssh now called from preseed_base, so not here OverlayLocal is now called from preseed base, so not here No need to set a default for $extra_packages in preseed_base, everyone passes something. v4: Rebase, pass $ho to preseed_base v3: Handle $xopts{ExtraPreseed} undefined in preseed_base fixup: No need to default fixup: Move OverlayLocal to preseed_base --- Osstest/Debian.pm | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm index 5ca93db..f7ef1d9 100644 --- a/Osstest/Debian.pm +++ b/Osstest/Debian.pm @@ -37,6 +37,7 @@ BEGIN { %preseed_cmds preseed_base preseed_create + preseed_create_guest preseed_ssh preseed_hook_command preseed_hook_installscript preseed_hook_overlay @@ -617,6 +618,8 @@ END sub preseed_base ($$$$;@) { my ($ho,$suite,$sfx,$extra_packages,%xopts) = @_; + $xopts{ExtraPreseed} ||= ''; + preseed_ssh($ho, $sfx); preseed_hook_overlay($ho, $sfx, $c{OverlayLocal}, 'overlay-local.tar'); @@ -702,6 +705,28 @@ END return $preseed; } +sub preseed_create_guest ($$;@) { + my ($ho, $sfx, %xopts) = @_; + + my $suite= $xopts{Suite} || $c{DebianSuite}; + + my $extra_packages; + + my $preseed_file= preseed_base($ho, $suite, $sfx, $extra_packages, %xopts); + $preseed_file.= (<<END); +d-i partman-auto/method string regular +d-i partman-auto/choose_recipe \\ + select All files in one partition (recommended for new users) + +d-i grub-installer/bootdev string /dev/xvda + +END + + $preseed_file .= preseed_hook_cmds(); + + return create_webfile($ho, "preseed$sfx", $preseed_file); +} + sub preseed_create ($$;@) { my ($ho, $sfx, %xopts) = @_; -- 2.1.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |