@@ -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';