[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH OSSTEST v4 04/25] Debian: refactor code to add preseed commands to the preseed file
Call it from ts-debian-hvm-install. Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx> Cc: longtaox.pang@xxxxxxxxx --- v3: New patch --- Osstest/Debian.pm | 16 +++++++++++----- ts-debian-hvm-install | 3 +++ 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm index 5e6bcba..ef602b1 100644 --- a/Osstest/Debian.pm +++ b/Osstest/Debian.pm @@ -37,7 +37,7 @@ BEGIN { %preseed_cmds preseed_base preseed_create - preseed_hook_command preseed_hook_installscript + preseed_hook_command preseed_hook_installscript preseed_hook_cmds di_installcmdline_core ); %EXPORT_TAGS = ( ); @@ -907,10 +907,7 @@ d-i partman-auto/expert_recipe string \\ END - foreach my $di_key (keys %preseed_cmds) { - $preseed_file .= "d-i preseed/$di_key string ". - (join ' && ', @{ $preseed_cmds{$di_key} }). "\n"; - } + $preseed_file .= preseed_hook_cmds(); if ($ho->{Flags}{'no-di-kernel'}) { $preseed_file .= <<END; @@ -954,4 +951,13 @@ chmod +x '$installer_pathname' END } +sub preseed_hook_cmds () { + my $preseed; + foreach my $di_key (keys %preseed_cmds) { + $preseed .= "d-i preseed/$di_key string ". + (join ' && ', @{ $preseed_cmds{$di_key} }). "\n"; + } + return $preseed; +} + 1; diff --git a/ts-debian-hvm-install b/ts-debian-hvm-install index cfd5144..95fce9a 100755 --- a/ts-debian-hvm-install +++ b/ts-debian-hvm-install @@ -77,6 +77,9 @@ d-i preseed/late_command string \\ in-target mkdir -p /root/.ssh; \\ in-target sh -c "echo -e '$authkeys'> /root/.ssh/authorized_keys"; END + + $preseed_file .= preseed_hook_cmds(); + return $preseed_file; } -- 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 |