Magellan Linux

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

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

alx-src/branches/alx-web-050/mageupgrade.php revision 1610 by niro, Thu Dec 2 23:02:19 2010 UTC alx-src/branches/alx-web-060/mageupgrade.php revision 2017 by niro, Mon May 9 16:31:38 2011 UTC
# Line 66  Line 66 
66   echo '<br>';   echo '<br>';
67   echo '<pre><div align=left class=left>';   echo '<pre><div align=left class=left>';
68   // hotfix copy a fixed mage.rc   // hotfix copy a fixed mage.rc
69   system('scp /var/www/localhost/htdocs/alx/he/mage.rc root@'.$ip.':/etc/mage.rc');   system('scp '.$magerc.' root@'.$ip.':/etc/mage.rc');
70   // hotfix2 and a config.rc   // hotfix2 and a config.rc
71   system('scp /var/www/localhost/htdocs/alx/he/config.rc root@'.$ip.':/etc/alxconfig-ng/config.rc');   system('scp '.$configrc.' root@'.$ip.':/etc/alxconfig-ng/config.rc');
72   editvar("VERBOSE","off","/etc/mage.rc");   editvar("VERBOSE","off","/etc/mage.rc");
73    
74   // update rsync server location   // update rsync server location
# 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   }   }
# Line 88  Line 105 
105   echo '<pre><div align=left class=left>';   echo '<pre><div align=left class=left>';
106   #echo 'forcing verbose=off <br>';   #echo 'forcing verbose=off <br>';
107   // hotfix copy a fixed mage.rc   // hotfix copy a fixed mage.rc
108   system('scp /var/www/localhost/htdocs/alx/he/mage.rc root@'.$ip.':/etc/mage.rc');   system('scp '.$magerc.' root@'.$ip.':/etc/mage.rc');
109   // hotfix2 and a config.rc   // hotfix2 and a config.rc
110   system('scp /var/www/localhost/htdocs/alx/he/config.rc root@'.$ip.':/etc/alxconfig-ng/config.rc');   system('scp '.$configrc.' root@'.$ip.':/etc/alxconfig-ng/config.rc');
111   editvar("VERBOSE","off","/etc/mage.rc");   editvar("VERBOSE","off","/etc/mage.rc");
112    
113   // update rsync server location   // update rsync server location

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