diff --git a/xCAT-server/lib/xcat/plugins/kit.pm b/xCAT-server/lib/xcat/plugins/kit.pm index 9e040593d..66cc126e8 100644 --- a/xCAT-server/lib/xcat/plugins/kit.pm +++ b/xCAT-server/lib/xcat/plugins/kit.pm @@ -841,6 +841,10 @@ sub addkit ($key,$value) = split /=/, $line; } + # Remove spaces in each lines. + $key =~s/^\s+|\s+$//g; + $value =~s/^\s+|\s+$//g; + # Add each attribute to different hash. if ( $sec =~ /KIT$/) { if ( $key =~ /kitname/ ) {