--- alx-src/branches/alx-web-050/mageupgrade.php 2010/12/02 21:46:31 1607
+++ alx-src/branches/alx-web-050/mageupgrade.php 2010/12/02 22:13:04 1608
@@ -1,5 +1,4 @@
- include('include/config.inc.php');
include('include/dbconn.php');
include('include/basesql.php');
@@ -15,7 +14,7 @@
global $sshcmd;
// sed cmd: ssh -l root 10.11.12.13 'sed -i -e "s|^\(VAR=\).*|\1\"VALUE\"| FILE'
- $str = $sshcmd.' -l root -o ConnectTimeout=5 '.$ip.' \'sed -i -e "s|^\\('.$var.'=\\).*|\\1\\"'.$value.'\\"|" '.$file.'\'';
+ $str = $sshcmd.' '.$ip.' \'sed -i -e "s|^\\('.$var.'=\\).*|\\1\\"'.$value.'\\"|" '.$file.'\'';
//echo $str.'
';
system($str);
}
@@ -36,7 +35,7 @@
if($op=="calc")
{
echo ' '.strtoupper('Fetching list of packages to upgrade on client #'.$client.' ('.$ip.')...
');
- exec($sshcmd.' -l root -o ConnectTimeout=5 '.$ip.' /sbin/mageupgrade --calc-bash',$out,$err);
+ exec($sshcmd.' '.$ip.' /sbin/mageupgrade --calc-bash',$out,$err);
echo '
';
echo '
';
if (array_key_exists("0", $out))
@@ -78,7 +77,7 @@
editvar("MAGE_RSYNC",$rsync,"/etc/alxconfig-ng/config.rc");
editvar("RSYNC",$rsync,"/etc/mage.rc");
- system($sshcmd.' -l root -o ConnectTimeout=5 '.$ip.' "NOCOLORS=true /sbin/mage update"');
+ system($sshcmd.' '.$ip.' "NOCOLORS=true /sbin/mage update"');
echo '';
echo '';
}
@@ -118,15 +117,15 @@
# check if /usr/sbin/update-alx exists, if not update mage-alx and alxconfig-alx first
- exec($sshcmd.' -l root -o ConnectTimeout=5 '.$ip.' "[ -x /usr/sbin/update-alx ] && exit 0 || exit 1"',$outarr,$err);
+ exec($sshcmd.' '.$ip.' "[ -x /usr/sbin/update-alx ] && exit 0 || exit 1"',$outarr,$err);
if($err!=0)
{
echo '"/usr/sbin/update-alx" missing on client "'.$client.'". Updating mage-alx and alxconfig-ng-alx first ...
';
- system($sshcmd.' -l root -o ConnectTimeout=5 '.$ip.' "NOCOLORS=true /sbin/mage install mage-alx"');
- system($sshcmd.' -l root -o ConnectTimeout=5 '.$ip.' "NOCOLORS=true /sbin/mage install alxconfig-ng-alx"');
+ system($sshcmd.' '.$ip.' "NOCOLORS=true /sbin/mage install mage-alx"');
+ system($sshcmd.' '.$ip.' "NOCOLORS=true /sbin/mage install alxconfig-ng-alx"');
}
- //system($sshcmd.' -l root -o ConnectTimeout=5 '.$ip.' "NOCOLORS=true /usr/sbin/update-alx"');
- exec($sshcmd.' -l root -o ConnectTimeout=5 '.$ip.' "NOCOLORS=true /usr/sbin/update-alx && exit 0 || exit 1"',$outarr,$err);
+ //system($sshcmd.' '.$ip.' "NOCOLORS=true /usr/sbin/update-alx"');
+ exec($sshcmd.' '.$ip.' "NOCOLORS=true /usr/sbin/update-alx && exit 0 || exit 1"',$outarr,$err);
echo '';
if ($err!=0) echo '';
else echo '';