From 4b2274ea266d5e3288f2d60bcd8f06bf19128f38 Mon Sep 17 00:00:00 2001 From: Arif Ali Date: Fri, 17 Jan 2014 08:45:17 +0000 Subject: [PATCH] fix bug 3971, trim othernames variable --- xCAT-server/lib/xcat/plugins/hosts.pm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xCAT-server/lib/xcat/plugins/hosts.pm b/xCAT-server/lib/xcat/plugins/hosts.pm index 609c6028b..096aa4e15 100755 --- a/xCAT-server/lib/xcat/plugins/hosts.pm +++ b/xCAT-server/lib/xcat/plugins/hosts.pm @@ -122,6 +122,10 @@ sub build_line my $othernames = shift; my @o_names = (); my @n_names = (); + + # Trim spaces from the beginning and end from $othernames + $othernames =~ s/^\s+|\s+$//g; + if (defined $othernames) { # the "hostnames" attribute can be a list delimited by