summaryrefslogtreecommitdiffstats
path: root/etc/rc.newwanipv6
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2013-02-09 14:17:38 +0000
committerErmal <eri@pfsense.org>2013-02-09 14:17:38 +0000
commite082d2f4232478784c36b6a84699847a435cb9d4 (patch)
tree12f005d0703ac7352bd577b58914c81159819a5b /etc/rc.newwanipv6
parent681a493ff665329562a714b17b4f0adad363c015 (diff)
downloadpfsense-e082d2f4232478784c36b6a84699847a435cb9d4.zip
pfsense-e082d2f4232478784c36b6a84699847a435cb9d4.tar.gz
Restart dhcp and radvd on change
Diffstat (limited to 'etc/rc.newwanipv6')
-rwxr-xr-xetc/rc.newwanipv621
1 files changed, 10 insertions, 11 deletions
diff --git a/etc/rc.newwanipv6 b/etc/rc.newwanipv6
index 6d33ead..9af7c67 100755
--- a/etc/rc.newwanipv6
+++ b/etc/rc.newwanipv6
@@ -91,16 +91,17 @@ if(empty($curwanipv6) || !is_ipaddrv6($curwanipv6)) {
exit;
}
-$name_servers = explode(" ", $_ENV['new_domain_name_servers']);
-$valid_ns = array();
-foreach($name_servers as $ns) {
- if(is_ipaddrv6(trim($ns)))
- $valid_ns[] = trim($ns);
-}
-
-if(count($valid_ns > 0))
- file_put_contents("{$g['varetc_path']}/nameserver_v6{$interface}", implode("\n", $valid_ns));
+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)))
+ $valid_ns[] = trim($ns);
+ }
+ if(count($valid_ns > 0))
+ file_put_contents("{$g['varetc_path']}/nameserver_v6{$interface}", implode("\n", $valid_ns));
+}
if(!empty($_ENV['new_domain_name']))
file_put_contents("{$g['varetc_path']}/searchdomain_v6{$interface}", $_ENV['new_domain_name']);
@@ -166,6 +167,4 @@ services_igmpproxy_configure();
restart_packages();
-services_radvd_configure();
-
?>
OpenPOWER on IntegriCloud