missing semicolons
This commit is contained in:
@@ -8,28 +8,6 @@ require_once("filter.inc");
|
||||
require_once("util.inc");
|
||||
require_once("system.inc");
|
||||
|
||||
|
||||
$iflist = legacy_config_get_interfaces(array('enable' => true, 'virtual' => false));
|
||||
$ifdetails = legacy_interfaces_details();
|
||||
|
||||
if (!count($iflist)) {
|
||||
echo "\n\tNo network interfaces are assigned.\n";
|
||||
return;
|
||||
}
|
||||
|
||||
$wanInfo = null;
|
||||
|
||||
foreach ($iflist as $ifname => $ifcfg) {
|
||||
$class = null;
|
||||
|
||||
if ($ifcfg['descr'] == 'WAN') {
|
||||
# this will have all the information about the WAN interface
|
||||
$ifcfg['details'] = $ifdetails[$ifcfg['if']];
|
||||
#print_r($ifcfg);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# I think i need to see the $config to see what things are like first
|
||||
# then I need to setup the config, write it and then start the WAN DHCP config
|
||||
# get the WAN_DHCP gateway IP address and WAN ip
|
||||
@@ -64,10 +42,10 @@ interface_configure(true, $interface, true);
|
||||
plugins_configure('monitor', true);
|
||||
filter_configure_sync(true);
|
||||
|
||||
printf("Done setting WAN to DHCP.")
|
||||
printf("Done setting WAN to DHCP.");
|
||||
|
||||
# DHCP ip address and gateway address
|
||||
printf("Getting DHCP and Gateway IP Addresses.")
|
||||
printf("Getting DHCP and Gateway IP Addresses.");
|
||||
|
||||
# get dHCP wan address and subnet
|
||||
|
||||
@@ -91,14 +69,14 @@ foreach ($iflist as $ifname => $ifcfg) {
|
||||
}
|
||||
}
|
||||
|
||||
$wanIP = $ifcfg['details']['ipv4'][0]['ipaddr']
|
||||
$wanSubnet = $ifcfg['details']['ipv4'][0]['subnetbits']
|
||||
$wanIP = $ifcfg['details']['ipv4'][0]['ipaddr'];
|
||||
$wanSubnet = $ifcfg['details']['ipv4'][0]['subnetbits'];
|
||||
printf("WAN DHCP IP: %s", $wanIP);
|
||||
printf("WAN DHCP Sbunet Bits: %s", $wanSubnet);
|
||||
$gatewayIP = shell_exec('netstat -rn | grep default | awk \'{print $2;}\'');
|
||||
printf("Gateway IP: %s", $gatewayIP);
|
||||
|
||||
printf("Done getting DHCP and Gateway IP Addresses.")
|
||||
printf("Done getting DHCP and Gateway IP Addresses.");
|
||||
/*
|
||||
# Config for WAN Static
|
||||
$config['interfaces'][$interface]['ipaddr'] = '192.168.101.1';
|
||||
|
||||
Reference in New Issue
Block a user