From: Ian Campbell Subject: [PATCH OSSTEST v4 04/25] Debian: refactor code to add preseed commands to the preseed file Date: Thu, 2 Apr 2015 10:16:18 +0100 Message-ID: <1427966199-5064-4-git-send-email-ian.campbell@citrix.com> References: <1427966183.4037.17.camel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1427966183.4037.17.camel@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: ian.jackson@eu.citrix.com Cc: longtaox.pang@intel.com, Ian Campbell , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org Call it from ts-debian-hvm-install. Signed-off-by: Ian Campbell Cc: longtaox.pang@intel.com --- 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 .= < /root/.ssh/authorized_keys"; END + + $preseed_file .= preseed_hook_cmds(); + return $preseed_file; } -- 2.1.4