From 6d4cc3f97dc60a65fb117dd2d4b1904b7c4ace3c Mon Sep 17 00:00:00 2001 From: ligc Date: Tue, 9 Apr 2013 08:20:15 +0000 Subject: [PATCH] fix for bug 3454: handle the object name like fd59::/64 git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@15892 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/DBobjUtils.pm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/perl-xCAT/xCAT/DBobjUtils.pm b/perl-xCAT/xCAT/DBobjUtils.pm index 890c9ca83..01f4267f7 100644 --- a/perl-xCAT/xCAT/DBobjUtils.pm +++ b/perl-xCAT/xCAT/DBobjUtils.pm @@ -1679,7 +1679,14 @@ sub readFileInput $look_for_colon = 0; # ok - we have a colon - ($objectname, $junk2) = split(/:/, $l); + # Remove any trailing whitespace + $l =~ s/\s*$//; + + # IPv6 network names could be something like fd59::/64 + # Use all the characters before the last ":" as the object name + # .* means greedy regular expression + $l =~ /^(.*):(.*?)$/; + ($objectname, $junk2) = ($1, $2); # if $junk2 is defined or there's an = if ($junk2 || grep(/=/, $objectname))