diff options
author | Ermal <eri@pfsense.org> | 2013-06-17 08:12:38 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2013-06-17 08:12:38 +0000 |
commit | 8026f19c93920ab6bbb1be2379fcbc6ae0ff9c80 (patch) | |
tree | 6b1bd6c716c53cdf3bea1a9281ec78a88c8462e7 /etc | |
parent | 81d0281d61f1df73591f943b6d8906b72290ff0a (diff) | |
download | pfsense-8026f19c93920ab6bbb1be2379fcbc6ae0ff9c80.zip pfsense-8026f19c93920ab6bbb1be2379fcbc6ae0ff9c80.tar.gz |
Remove useless variable and also correct some style
Diffstat (limited to 'etc')
-rwxr-xr-x | etc/rc.newwanipv6 | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/etc/rc.newwanipv6 b/etc/rc.newwanipv6 index a9b17a5..1b02aa8 100755 --- a/etc/rc.newwanipv6 +++ b/etc/rc.newwanipv6 @@ -67,7 +67,6 @@ if(empty($argument)) { $interface_real = $argument; $interface = convert_real_interface_to_friendly_interface_name($interface_real); $curwanipv6 = get_interface_ipv6($interface, true); - $interface_realv6 = get_real_interface($interface, "inet6"); } if (empty($interface)) { @@ -77,10 +76,10 @@ if (empty($interface)) { } //Do not process while booting -if($g['booting'] && $config['interfaces'][$interface]['ipaddrv6'] != "dhcp6") +if ($g['booting'] && $config['interfaces'][$interface]['ipaddrv6'] != "dhcp6") exit; -if(empty($curwanipv6) || !is_ipaddrv6($curwanipv6)) { +if (empty($curwanipv6) || !is_ipaddrv6($curwanipv6)) { log_error("rc.newwanipv6: Failed to update {$interface} IPv6, restarting..."); // send_event("interface reconfigure {$interface}"); exit; @@ -90,20 +89,20 @@ if (!empty($_ENV['new_domain_name_servers'])) { $name_servers = explode(" ", $_ENV['new_domain_name_servers']); $valid_ns = array(); foreach($name_servers as $ns) { - if(is_ipaddrv6(trim($ns))) + if (is_ipaddrv6(trim($ns))) $valid_ns[] = trim($ns); } - if(count($valid_ns > 0)) + if (count($valid_ns > 0)) file_put_contents("{$g['varetc_path']}/nameserver_v6{$interface}", implode("\n", $valid_ns)); } -if(!empty($_ENV['new_domain_name'])) +if (!empty($_ENV['new_domain_name'])) file_put_contents("{$g['varetc_path']}/searchdomain_v6{$interface}", $_ENV['new_domain_name']); /* write current WAN IPv6 to file */ file_put_contents("{$g['vardb_path']}/{$interface}_ipv6", $curwanipv6); -log_error("rc.newwanipv6: on (IP address: {$curwanipv6}) (interface: {$interface}) (real interface: {$interface_realv6})."); +log_error("rc.newwanipv6: on (IP address: {$curwanipv6}) (interface: {$interface}) (real interface: {$interface_real})."); $oldipv6 = ""; if (file_exists("{$g['vardb_path']}/{$interface}_cacheipv6")) @@ -135,11 +134,12 @@ if (is_ipaddrv6($oldipv6)) { vpn_ipsec_force_reload($interface); /* start OpenVPN server & clients */ - openvpn_resync_all($interface); + if (substr($interface_real, 0, 4) != "ovpn") + openvpn_resync_all($interface); } exit; - } else if (does_interface_exist($interface_realv6)) - mwexec("/sbin/ifconfig {$interface_realv6} inet6 {$oldipv6} delete"); + } else if (does_interface_exist($interface_real)) + mwexec("/sbin/ifconfig {$interface_real} inet6 {$oldipv6} delete"); } file_put_contents("{$g['vardb_path']}/{$interface}_cacheipv6", $curwanipv6); |