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:
parent
1ea14c012b
commit
39484a62a7
@ -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});
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user