modify by xu qing

on xCAT_plugin::web::web_update 
for update the rpm on web interface

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@6637 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
xq2005 2010-07-02 08:24:08 +00:00
parent 1ea14c012b
commit 39484a62a7

View File

@ -360,7 +360,7 @@ sub web_update {
$cmd = "wget -O " . $LocalRpmFilePath . " " . $RemoteRpmFilePath;
if(0 != system($cmd))
{
$ReturnInfo = $ReturnInfo . "update " . $_ . " failed:" . $! . "\n";
$ReturnInfo = $ReturnInfo . "update " . $_ . " failed: can not download the rpm\n";
$callback->({error=>$ReturnInfo, errorcode=>[1]});
return;
}
@ -368,15 +368,9 @@ sub web_update {
#update rpm by rpm packages.
$cmd = "rpm -U " . $LocalRpmFilePath;
if (0 != system($cmd))
{
$ReturnInfo = $ReturnInfo . "update " . $_ . " failed:" . $! . "\n";
$callback->({error=>$ReturnInfo, errorcode=>[1]});
return;
}
$ReturnInfo = $ReturnInfo . "update " . $_ . " successful.\n";
$ReturnInfo = $ReturnInfo . readpipe($cmd);
}
$callback->({info=>$cmd});
$callback->({info=>$ReturnInfo});
}
}