Magellan Linux

Diff of /alx-src/branches/alx-web-060/mageupgrade.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1610 by niro, Thu Dec 2 23:02:19 2010 UTC revision 1629 by niro, Thu Dec 9 22:16:42 2010 UTC
# Line 77  Line 77 
77   editvar("MAGE_RSYNC",$rsync,"/etc/alxconfig-ng/config.rc");   editvar("MAGE_RSYNC",$rsync,"/etc/alxconfig-ng/config.rc");
78   editvar("RSYNC",$rsync,"/etc/mage.rc");   editvar("RSYNC",$rsync,"/etc/mage.rc");
79    
80     // update repository server location
81     $repository = sqlfirst('select client_locations.repository from client_serials inner join client_locations on client_locations.location=client_serials.location and client_serials.serial='.$client, 'repository');
82     editvar("MAGE_MIRRORS",$repository,"/etc/alxconfig-ng/config.rc");
83     editvar("MIRRORS",$repository,"/etc/mage.rc");
84    
85     // update samba update host
86     $updateserver = sqlfirst('select client_locations.updateserver from client_serials inner join client_locations on client_locations.location=client_serials.location and client_serials.serial='.$client, 'updateserver');
87     editvar("SMB_UPDATE_HOST",$updateserver,"/etc/alxconfig-ng/config.rc");
88    
89     // update samba update user
90     $smbusername = sqlfirst('select client_locations.username from client_serials inner join client_locations on client_locations.location=client_serials.location and client_serials.serial='.$client, 'username');
91     editvar("SMB_UPDATE_USER",$smbusername,"/etc/alxconfig-ng/config.rc");
92    
93     // update samba update password
94     $smbpassword = sqlfirst('select client_locations.password from client_serials inner join client_locations on client_locations.location=client_serials.location and client_serials.serial='.$client, 'password');
95     editvar("SMB_UPDATE_PASS",$smbpassword,"/etc/alxconfig-ng/config.rc");
96   system($sshcmd.' '.$ip.' "NOCOLORS=true /sbin/mage update"');   system($sshcmd.' '.$ip.' "NOCOLORS=true /sbin/mage update"');
97    
98   echo '</div></pre>';   echo '</div></pre>';
99   echo '<script language="JavaScript">alert(\'Database-update successfully completed on client #'.$client.' .\')</script>';   echo '<script language="JavaScript">alert(\'Database-update successfully completed on client #'.$client.' .\')</script>';
100   }   }

Legend:
Removed from v.1610  
changed lines
  Added in v.1629