summaryrefslogtreecommitdiffstats
path: root/etc/rc.newwanipv6
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2013-12-20 22:32:21 +0000
committerErmal <eri@pfsense.org>2013-12-20 22:32:21 +0000
commit362ec35df2999b4ab75c72473c0b3c938070c2bc (patch)
treeaf39baa4761f8804c08e8fe33dd9614c1b7776d3 /etc/rc.newwanipv6
parentaa205c3b69bf76b1565fd42dba83c7637212f793 (diff)
downloadpfsense-362ec35df2999b4ab75c72473c0b3c938070c2bc.zip
pfsense-362ec35df2999b4ab75c72473c0b3c938070c2bc.tar.gz
Do not register the _ENV superglobal since its not required and probably not very useful in a [F]CGI world and its limit is restricted nowdays in pfSense.
Diffstat (limited to 'etc/rc.newwanipv6')
-rwxr-xr-xetc/rc.newwanipv610
1 files changed, 6 insertions, 4 deletions
diff --git a/etc/rc.newwanipv6 b/etc/rc.newwanipv6
index 1b02aa8..dec1736 100755
--- a/etc/rc.newwanipv6
+++ b/etc/rc.newwanipv6
@@ -85,8 +85,9 @@ if (empty($curwanipv6) || !is_ipaddrv6($curwanipv6)) {
exit;
}
-if (!empty($_ENV['new_domain_name_servers'])) {
- $name_servers = explode(" ", $_ENV['new_domain_name_servers']);
+$new_domain_name_servers = getenv("new_domain_name_servers");
+if (!empty($new_domain_name_servers)) {
+ $name_servers = explode(" ", $new_domain_name_servers);
$valid_ns = array();
foreach($name_servers as $ns) {
if (is_ipaddrv6(trim($ns)))
@@ -96,8 +97,9 @@ if (!empty($_ENV['new_domain_name_servers'])) {
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']);
+$new_domain_name = getenv("new_domain_name");
+if (!empty($new_domain_name))
+ file_put_contents("{$g['varetc_path']}/searchdomain_v6{$interface}", $new_domain_name);
/* write current WAN IPv6 to file */
file_put_contents("{$g['vardb_path']}/{$interface}_ipv6", $curwanipv6);
OpenPOWER on IntegriCloud