marsadm: fix whitespace in template names

This commit is contained in:
Thomas Schoebel-Theuer 2019-02-03 16:07:40 +01:00 committed by Thomas Schoebel-Theuer
parent c6e31dc6da
commit cabb3cbe5c
1 changed files with 3 additions and 1 deletions

View File

@ -314,7 +314,9 @@ sub subst_systemd_vars {
sub instantiate_systemd_unit {
my ($cmd, $res, $template_file) = @_;
my $replac = subst_systemd_vars(1, $cmd, $res, `basename "$template_file"`);
my $basename = `basename "$template_file"`;
chomp $basename;
my $replac = subst_systemd_vars(1, $cmd, $res, $basename);
my $outfile = "$systemd_target_dir/$replac";
chomp $outfile;
lprint "==== Translate systemd template '$template_file' => '$outfile'\n" if $verbose;