diff --git a/encoder/network.php b/encoder/network.php index ffc7363..39aa5dd 100755 --- a/encoder/network.php +++ b/encoder/network.php @@ -16,7 +16,6 @@ $defaults = [ 'network_primary_ipv6' => '', 'network_primary_ipv6_prefix' => '', 'network_primary_ipv6_gateway' => '', - 'network_primary_ipv6_vlan' => '', 'network_primary_ipv6_dns1' => '', 'network_primary_ipv6_dns2' => '', ], @@ -31,7 +30,6 @@ $defaults = [ 'network_secondary_ipv6' => '', 'network_secondary_ipv6_prefix' => '', 'network_secondary_ipv6_gateway' => '', - 'network_secondary_ipv6_vlan' => '', 'network_secondary_ipv6_dns1' => '', 'network_secondary_ipv6_dns2' => '', ], @@ -66,7 +64,6 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { $network_primary_ipv6 = $get('network_primary_ipv6'); $network_primary_ipv6_prefix = $get('network_primary_ipv6_prefix'); $network_primary_ipv6_gateway = $get('network_primary_ipv6_gateway'); - $network_primary_ipv6_vlan = $get('network_primary_ipv6_vlan'); $network_primary_ipv6_dns1 = $get('network_primary_ipv6_dns1'); $network_primary_ipv6_dns2 = $get('network_primary_ipv6_dns2'); @@ -79,7 +76,6 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { $network_secondary_ipv6 = $get('network_secondary_ipv6'); $network_secondary_ipv6_prefix = $get('network_secondary_ipv6_prefix'); $network_secondary_ipv6_gateway = $get('network_secondary_ipv6_gateway'); - $network_secondary_ipv6_vlan = $get('network_secondary_ipv6_vlan'); $network_secondary_ipv6_dns1 = $get('network_secondary_ipv6_dns1'); $network_secondary_ipv6_dns2 = $get('network_secondary_ipv6_dns2'); @@ -95,7 +91,6 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { 'network_primary_ipv6' => $network_primary_ipv6, 'network_primary_ipv6_prefix' => $network_primary_ipv6_prefix, 'network_primary_ipv6_gateway' => $network_primary_ipv6_gateway, - 'network_primary_ipv6_vlan' => $network_primary_ipv6_vlan, 'network_primary_ipv6_dns1' => $network_primary_ipv6_dns1, 'network_primary_ipv6_dns2' => $network_primary_ipv6_dns2 ], @@ -110,7 +105,6 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { 'network_secondary_ipv6' => $network_secondary_ipv6, 'network_secondary_ipv6_prefix' => $network_secondary_ipv6_prefix, 'network_secondary_ipv6_gateway' => $network_secondary_ipv6_gateway, - 'network_secondary_ipv6_vlan' => $network_secondary_ipv6_vlan, 'network_secondary_ipv6_dns1' => $network_secondary_ipv6_dns1, 'network_secondary_ipv6_dns2' => $network_secondary_ipv6_dns2 ], @@ -198,10 +192,6 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { -
- - -
@@ -276,10 +266,6 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
-
- - -
diff --git a/encoder/static.php b/encoder/static.php index a7fa69a..16653be 100755 --- a/encoder/static.php +++ b/encoder/static.php @@ -957,86 +957,6 @@ function update_service($which_service) function update_firewall() {} -function update_network() -{ - $ethInterfaces = []; - $jsonFile = __DIR__ . '/network.json'; - $ethInterface = ""; - - foreach (scandir('/sys/class/net') as $iface) { - if ($iface === '.' || $iface === '..' || $iface === 'lo') { - continue; - } - - $base = "/sys/class/net/$iface"; - - // Must be physical hardware - if (!is_dir("$base/device")) { - continue; - } - - // Exclude wireless - if (is_dir("$base/wireless")) { - continue; - } - - // Must be Ethernet - $type = @file_get_contents("$base/type"); - if (trim($type) !== '1') { - continue; - } - - $ethInterfaces[] = $iface; - } - - $ethInterfaces - ? $ethInterface = $ethInterfaces[0] - : 'No physical wired Ethernet NIC found'; - - if ($ethInterface != "") { - $defaults = [ - 'primary' => [ - 'mode' => 'dhcp', - 'modev6' => 'auto', - 'network_primary_ip' => '', - 'network_primary_subnet' => '', - 'network_primary_gateway' => '', - 'network_primary_vlan' => '', - 'network_primary_dns1' => '', - 'network_primary_dns2' => '', - 'network_primary_ipv6' => '', - 'network_primary_ipv6_prefix' => '', - 'network_primary_ipv6_gateway' => '', - 'network_primary_ipv6_vlan' => '', - 'network_primary_ipv6_dns1' => '', - 'network_primary_ipv6_dns2' => '', - ], - 'secondary' => [ - 'mode' => 'disabled', - 'modev6' => 'disabled', - 'network_secondary_ip' => '', - 'network_secondary_gateway' => '', - 'network_secondary_vlan' => '', - 'network_secondary_dns1' => '', - 'network_secondary_dns2' => '', - 'network_secondary_ipv6' => '', - 'network_secondary_ipv6_prefix' => '', - 'network_secondary_ipv6_gateway' => '', - 'network_secondary_ipv6_vlan' => '', - 'network_secondary_ipv6_dns1' => '', - 'network_secondary_ipv6_dns2' => '', - ], - 'firewall' => 'disable', - 'ips' => ['', '', '', '', ''] - ]; - - if (file_exists($jsonFile)) { - $raw = file_get_contents($jsonFile); - $data = json_decode($raw, true); - } - } -} - function update_firmware() {} function update_service_backend($service)