From 5def082bfb007971712e42246159b3394ea83574 Mon Sep 17 00:00:00 2001 From: Matt Ezell Date: Tue, 5 Dec 2017 21:52:39 -0500 Subject: [PATCH] Make sure credential files have a trailing newline (#4442) --- xCAT-server/lib/xcat/plugins/credentials.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/xCAT-server/lib/xcat/plugins/credentials.pm b/xCAT-server/lib/xcat/plugins/credentials.pm index 7e128a782..828bc253f 100644 --- a/xCAT-server/lib/xcat/plugins/credentials.pm +++ b/xCAT-server/lib/xcat/plugins/credentials.pm @@ -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 = "";