Project

General

Profile

« Previous | Next » 

Revision 362ec35d

Added by Ermal LUÇI over 11 years ago

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.

View differences:

etc/rc.newwanipv6
85 85
        exit;
86 86
}
87 87

  
88
if (!empty($_ENV['new_domain_name_servers'])) {
89
	$name_servers = explode(" ", $_ENV['new_domain_name_servers']);
88
$new_domain_name_servers = getenv("new_domain_name_servers");
89
if (!empty($new_domain_name_servers)) {
90
	$name_servers = explode(" ", $new_domain_name_servers);
90 91
	$valid_ns = array();
91 92
	foreach($name_servers as $ns) {
92 93
		if (is_ipaddrv6(trim($ns)))
......
96 97
	if (count($valid_ns > 0))
97 98
		file_put_contents("{$g['varetc_path']}/nameserver_v6{$interface}", implode("\n", $valid_ns));
98 99
}
99
if (!empty($_ENV['new_domain_name']))
100
	file_put_contents("{$g['varetc_path']}/searchdomain_v6{$interface}", $_ENV['new_domain_name']);
100
$new_domain_name = getenv("new_domain_name");
101
if (!empty($new_domain_name))
102
	file_put_contents("{$g['varetc_path']}/searchdomain_v6{$interface}", $new_domain_name);
101 103

  
102 104
/* write current WAN IPv6 to file */
103 105
file_put_contents("{$g['vardb_path']}/{$interface}_ipv6", $curwanipv6);

Also available in: Unified diff