[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH RFC V2 3/6] Debian.pm: factor out preseed_base
Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx> --- Osstest/Debian.pm | 129 +++++++++++++++++++++++++++++------------------------ 1 file changed, 70 insertions(+), 59 deletions(-) diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm index e51a233..54bc843 100644 --- a/Osstest/Debian.pm +++ b/Osstest/Debian.pm @@ -33,6 +33,7 @@ BEGIN { @ISA = qw(Exporter); @EXPORT = qw(debian_boot_setup %preseed_cmds + preseed_base preseed_create preseed_hook_command preseed_hook_installscript di_installcmdline_core @@ -432,7 +433,73 @@ sub di_installcmdline_core ($$;@) { if defined $debconf_priority; return @cl; -} +} + +sub preseed_base ($) { + my ($suite) = @_; + + return <<'END'; +d-i mirror/suite string $suite + +d-i debian-installer/locale string en_GB +d-i console-keymaps-at/keymap select gb +d-i keyboard-configuration/xkb-keymap string en_GB + +#d-i debconf/frontend string readline + +d-i mirror/country string manual +d-i mirror/http/proxy string + +d-i clock-setup/utc boolean true +d-i time/zone string Europe/London +d-i clock-setup/ntp boolean true + +d-i partman-md/device_remove_md boolean true +d-i partman-lvm/device_remove_lvm boolean true +d-i partman-partitioning/confirm_write_new_label boolean true +d-i partman/choose_partition select finish +d-i partman/confirm boolean true +d-i partman-lvm/confirm boolean true + +d-i partman/confirm_nooverwrite true +d-i partman-lvm/confirm_nooverwrite true +d-i partman-md/confirm_nooverwrite true +d-i partman-crypto/confirm_nooverwrite true + +#d-i netcfg/disable_dhcp boolean true +d-i netcfg/get_nameservers string $c{NetNameservers} +#d-i netcfg/get_netmask string \$c{NetNetmask} +#d-i netcfg/get_gateway string \$c{NetGateway} +d-i netcfg/confirm_static boolean true +d-i netcfg/get_domain string $c{TestHostDomain} +d-i netcfg/wireless_wep string + +d-i passwd/root-password password xenroot +d-i passwd/root-password-again password xenroot +d-i passwd/user-fullname string FLOSS Xen Test +d-i passwd/username string osstest +d-i passwd/user-password password osstest +d-i passwd/user-password-again password osstest + +console-common console-data/keymap/policy select Don't touch keymap +console-data console-data/keymap/policy select Don't touch keymap +console-data console-data/keymap/family select qwerty +console-data console-data/keymap/template/layout select British + +popularity-contest popularity-contest/participate boolean false +tasksel tasksel/first multiselect standard, web-server + +d-i grub-installer/only_debian boolean true + +d-i finish-install/keep-consoles boolean true +d-i finish-install/reboot_in_progress note +d-i cdrom-detect/eject boolean false + +d-i mirror/http/hostname string $c{DebianMirrorHost} +d-i mirror/http/directory string /$c{DebianMirrorSubpath} + +END +} sub preseed_create ($$;@) { my ($ho, $sfx, %xopts) = @_; @@ -619,45 +686,12 @@ END my $extra_packages = join(",",@extra_packages); - my $preseed_file= (<<END); -d-i mirror/suite string $suite - -d-i debian-installer/locale string en_GB -d-i console-keymaps-at/keymap select gb -d-i keyboard-configuration/xkb-keymap string en_GB - -#d-i debconf/frontend string readline - -d-i mirror/country string manual -d-i mirror/http/proxy string - -d-i clock-setup/utc boolean true -d-i time/zone string Europe/London -d-i clock-setup/ntp boolean true + my $preseed_file= preseed_base($suite); + $preseed_file .= (<<END); d-i partman-auto/method string lvm #d-i partman-auto/method string regular -d-i partman-md/device_remove_md boolean true -d-i partman-lvm/device_remove_lvm boolean true -d-i partman-partitioning/confirm_write_new_label boolean true -d-i partman/choose_partition select finish -d-i partman/confirm boolean true -d-i partman-lvm/confirm boolean true - -d-i partman/confirm_nooverwrite true -d-i partman-lvm/confirm_nooverwrite true -d-i partman-md/confirm_nooverwrite true -d-i partman-crypto/confirm_nooverwrite true - -#d-i netcfg/disable_dhcp boolean true -d-i netcfg/get_nameservers string $c{NetNameservers} -#d-i netcfg/get_netmask string \$c{NetNetmask} -#d-i netcfg/get_gateway string \$c{NetGateway} -d-i netcfg/confirm_static boolean true -d-i netcfg/get_domain string $c{TestHostDomain} -d-i netcfg/wireless_wep string - #d-i partman-auto/init_automatically_partition select regular d-i partman-auto/disk string $disk @@ -685,32 +719,9 @@ d-i partman-auto/expert_recipe string \\ lv_name{ dummy } \\ . -d-i passwd/root-password password xenroot -d-i passwd/root-password-again password xenroot -d-i passwd/user-fullname string FLOSS Xen Test -d-i passwd/username string osstest -d-i passwd/user-password password osstest -d-i passwd/user-password-again password osstest - -console-common console-data/keymap/policy select Don't touch keymap -console-data console-data/keymap/policy select Don't touch keymap -console-data console-data/keymap/family select qwerty -console-data console-data/keymap/template/layout select British - -popularity-contest popularity-contest/participate boolean false -tasksel tasksel/first multiselect standard, web-server d-i pkgsel/include string openssh-server, ntp, ntpdate, $extra_packages -d-i grub-installer/only_debian boolean true - -d-i finish-install/keep-consoles boolean true -d-i finish-install/reboot_in_progress note -d-i cdrom-detect/eject boolean false - -d-i mirror/http/hostname string $c{DebianMirrorHost} -d-i mirror/http/directory string /$c{DebianMirrorSubpath} - $xopts{ExtraPreseed} 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 |