[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [OSSTEST PATCH 56/82] subst_netboot_template: Do not use all of %r
From: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> Instead of copying all of %r into %v, have the template substitutor fall back to %r from %v. This is going to be important when we have host-reuse-related access control to %r. Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> --- Osstest/TestSupport.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm index be6b7119..634d6d2e 100644 --- a/Osstest/TestSupport.pm +++ b/Osstest/TestSupport.pm @@ -2876,6 +2876,7 @@ sub subst_netboot_template ($$$) { $pat =~ s{\%(\w*)\%}{ $1 eq '' ? '%' : defined($v->{$1}) ? $v->{$1} : + defined($r{$1}) ? $r{$1} : next; }ge; # and return the first pattern we managed to completely substitute @@ -2890,7 +2891,7 @@ sub host_netboot_file ($;$) { # returns the full netboot filename path # in array context, returns (dir, pathtail) # where dir does not depend on $templatekeytail - my %v = %r; + my %v; my $firmware = get_host_property($ho, "firmware"); my $templatekeybase = $firmware eq 'uefi' ? 'NetGrub' : 'Pxe'; $templatekeytail //= 'Templates'; -- 2.20.1
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |