2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-07-31 08:41:18 +00:00

Make sure credential files have a trailing newline (#4442)

This commit is contained in:
Matt Ezell
2017-12-05 21:52:39 -05:00
committed by yangsong
parent 9010d1042e
commit 5def082bfb

View File

@@ -321,6 +321,7 @@ sub process_request
open($tmpfile, $tfilename);
@filecontent = <$tmpfile>;
close($tmpfile);
$filecontent[$#filecontent] =~ s/\n?$/\n/;
$retdata = "\n" . join('', @filecontent);
push @{ $rsp->{'data'} }, { content => [$retdata], desc => [$parm] };
$retdata = "";