Changeset 187 for trunk/system/generators/dhcp_routerboard.php
- Timestamp:
- Apr 5, 2009, 3:54:46 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/system/generators/dhcp_routerboard.php
r171 r187 3 3 include_once('../../global.php'); 4 4 5 $UserName = 'admin-ssh'; 6 7 $DbResult = $Database->query('SELECT * FROM NetworkSubnet'); 5 $DbResult = $Database->query('SELECT * FROM `NetworkSubnet` WHERE `Member` = 0'); 8 6 while($Subnet = $DbResult->fetch_assoc()) 9 7 { … … 13 11 $Commands = array(); 14 12 $Commands[] = '/ip dhcp-server lease { remove [find server=dhcp'.$I.']}'; 15 $DbResult2 = $Database->query('SELECT * FROM hosts WHERE (IP LIKE "192.168.'.$I.'.%") AND (MAC != "00:00:00:00:00:00") ORDER BY IP');13 $DbResult2 = $Database->query('SELECT * FROM `hosts` WHERE (`IP` LIKE "192.168.'.$I.'.%") AND (`MAC` != "00:00:00:00:00:00") ORDER BY `IP`'); 16 14 while($Host = $DbResult2->fetch_assoc()) 17 15 { … … 19 17 } 20 18 $Commands = implode(';', $Commands); 21 $Command = '/usr/bin/ssh -l '.$ UserName.' -i id_dsa '.$Subnet['DHCP'].' "'.$Commands.'"';19 $Command = '/usr/bin/ssh -l '.$Config['MainRouter']['UserName'].' -i id_dsa '.$Subnet['DHCP'].' "'.$Commands.'"'; 22 20 //echo($Command."\n"); 23 21 $Output = '';
Note:
See TracChangeset
for help on using the changeset viewer.