fix a bug about 'chvm <lpar> lparname=xxx' not work properly

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@13338 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
zhaoertao 2012-07-24 06:53:31 +00:00
parent f7b7027c5a
commit fe27cd788f

View File

@ -60,7 +60,7 @@ sub chvm_parse_extra_options {
return "no value specified";
}
if ($cmd =~ /^lparname$/) {
if ($value ne '*' && $value !~ /^[a-zA-Z0-9-_]$/) {
if ($value ne '*' && $value !~ /^[a-zA-Z0-9-_]+$/) {
return "'$value' invalid";
}
my $len = rindex $value."\$", "\$";