summaryrefslogtreecommitdiffstats
path: root/etc/rc.newwanipv6
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2013-06-17 08:12:38 +0000
committerErmal <eri@pfsense.org>2013-06-17 08:13:12 +0000
commit10ce1ac1cdf271b545bce23a1a60a73dd0221813 (patch)
treee5144113e3193150e5f4c00692791bad7f5ff27d /etc/rc.newwanipv6
parentca2b90ec7e4cc2c4f2435c3126f74b5e268b43aa (diff)
downloadpfsense-10ce1ac1cdf271b545bce23a1a60a73dd0221813.zip
pfsense-10ce1ac1cdf271b545bce23a1a60a73dd0221813.tar.gz
Remove useless variable and also correct some style
Diffstat (limited to 'etc/rc.newwanipv6')
-rwxr-xr-xetc/rc.newwanipv620
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);
OpenPOWER on IntegriCloud