fixed bug 3115035 and bug 3115135

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@8225 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
jjhua 2010-11-22 07:54:02 +00:00
parent d47cef6ea6
commit ea30ad1a72

View File

@ -281,12 +281,20 @@ sub fsp_api_passwd {
# Create command and run command
#################################
my $cmd;
$cmd = "$fsp_api -a set_fsp_pw -u $user -p $passwd -P $newpasswd -t $type:$fsp_ip:$id:$node_name: ";
if( $passwd ne "" ) {
$cmd = "$fsp_api -a set_fsp_pw -u $user -p $passwd -P $newpasswd -t $type:$fsp_ip:$id:$node_name: ";
} else {
$cmd = "$fsp_api -a set_fsp_pw -u $user -P $newpasswd -t $type:$fsp_ip:$id:$node_name: ";
}
$SIG{CHLD} = ();
$res = xCAT::Utils->runcmd($cmd, -1);
$Rc = $::RUNCMD_RC;
if($Rc == 0) {
$res = "Success";
}
##################
# output the prompt
##################