summaryrefslogtreecommitdiffstats
path: root/etc/inc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2011-02-25 17:14:45 -0500
committerScott Ullrich <sullrich@pfsense.org>2011-02-25 17:14:45 -0500
commit0c4f8ca831e158de0c27b0e7c7c5f821eccd36d0 (patch)
treea4f5a47352f163e41fa5bde27508d4bcf1123c75 /etc/inc
parenta299232e558aa3ca146ea78239522ce3730e8817 (diff)
parent17e7a243508c1c60a027716703a1bc7687ae0033 (diff)
downloadpfsense-0c4f8ca831e158de0c27b0e7c7c5f821eccd36d0.zip
pfsense-0c4f8ca831e158de0c27b0e7c7c5f821eccd36d0.tar.gz
Merge remote branch 'upstream/master'
Diffstat (limited to 'etc/inc')
-rw-r--r--etc/inc/captiveportal.inc8
-rw-r--r--etc/inc/dyndns.class4
-rw-r--r--etc/inc/interfaces.inc2
-rw-r--r--etc/inc/pkg-utils.inc13
-rw-r--r--etc/inc/upgrade_config.inc22
5 files changed, 33 insertions, 16 deletions
diff --git a/etc/inc/captiveportal.inc b/etc/inc/captiveportal.inc
index 013a28a..f414d9a 100644
--- a/etc/inc/captiveportal.inc
+++ b/etc/inc/captiveportal.inc
@@ -1858,7 +1858,7 @@ function portal_consume_passthrough_credit($clientmac) {
else
return false;
- if ($freeloginscount < 1 || $resettimeout <= 0 || !clientmac)
+ if ($freeloginscount < 1 || $resettimeout <= 0 || !$clientmac)
return false;
$updatetimeouts = isset($config['captiveportal']['freelogins_updatetimeouts']);
@@ -1914,7 +1914,7 @@ function captiveportal_read_usedmacs_db() {
$cpumaclck = lock('captiveusedmacs');
if (file_exists("{$g['vardb_path']}/captiveportal_usedmacs.db")) {
$usedmacs = file("{$g['vardb_path']}/captiveportal_usedmacs.db", FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
- if (!usedmacs)
+ if (!$usedmacs)
$usedmacs = array();
} else
$usedmacs = array();
@@ -1931,6 +1931,4 @@ function captiveportal_write_usedmacs_db($usedmacs) {
unlock($cpumaclck);
}
-
-
-?>
+?> \ No newline at end of file
diff --git a/etc/inc/dyndns.class b/etc/inc/dyndns.class
index da8844e..dcde894 100644
--- a/etc/inc/dyndns.class
+++ b/etc/inc/dyndns.class
@@ -43,7 +43,7 @@
* ZoneEdit - Last Tested: NEVER
* Dyns - Last Tested: NEVER
* ODS - Last Tested: 02 August 2005
- * FreeDNS - Last Tested: NEVER
+ * FreeDNS - Last Tested: 23 Feb 2011
* Loopia - Last Tested: NEVER
* StaticCling - Last Tested: 27 April 2006
* DNSexit - Last Tested: 20 July 2008
@@ -350,7 +350,7 @@
break;
case 'freedns':
$needIP = FALSE;
- curl_setopt($ch, CURLOPT_URL, 'http://freedns.afraid.org/dynamic/update.php?' . $this->_dnsHost);
+ curl_setopt($ch, CURLOPT_URL, 'http://freedns.afraid.org/dynamic/update.php?' . $this->_dnsPass);
$data = curl_exec($ch);
if (@curl_error($ch)) log_error("Curl error occurred: " . curl_error($ch));
curl_close($ch);
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc
index a6d802d..d32423d 100644
--- a/etc/inc/interfaces.inc
+++ b/etc/inc/interfaces.inc
@@ -3659,7 +3659,7 @@ function is_altq_capable($int) {
* Only the following drivers have ALTQ support
*/
$capable = array("age", "alc", "ale", "an", "ath", "aue", "awi", "bce",
- "bfe", "bge", "dc", "de", "ed", "em", "ep", "fxp", "gem",
+ "bfe", "bge", "bridge", "dc", "de", "ed", "em", "ep", "fxp", "gem",
"hme", "igb", "ipw", "iwi", "jme", "le", "lem", "msk", "mxge", "my", "nfe",
"npe", "nve", "ral", "re", "rl", "rum", "run", "bwn", "sf", "sis", "sk",
"ste", "stge", "txp", "udav", "ural", "vge", "vr", "wi", "xl",
diff --git a/etc/inc/pkg-utils.inc b/etc/inc/pkg-utils.inc
index 3a2984a..3f901e2 100644
--- a/etc/inc/pkg-utils.inc
+++ b/etc/inc/pkg-utils.inc
@@ -451,6 +451,14 @@ function sync_package($pkg_name, $sync_depends = true, $show_message = false) {
function pkg_fetch_recursive($pkgname, $filename, $dependlevel = 0, $base_url = "") {
global $static_output, $g;
+ if (($g['platform'] == "nanobsd") || ($g['platform'] == "embedded")) {
+ $pkgtmpdir = "/usr/bin/env PKG_TMPDIR=/root/ ";
+ $pkgstaging = "-t /root/tmp/instmp.XXXXXX";
+ $fetchdir = "/root/tmp/";
+ } else {
+ $fetchdir = $g['tmp_path'];
+ }
+
$osname = php_uname("s");
$arch = php_uname("m");
$rel = strtolower(php_uname("r"));
@@ -461,7 +469,7 @@ function pkg_fetch_recursive($pkgname, $filename, $dependlevel = 0, $base_url =
$base_url = $priv_url;
if (substr($base_url, -1) == "/")
$base_url = substr($base_url, 0, -1);
- $fetchto = "{$g['tmp_path']}/apkg_{$filename}";
+ $fetchto = "{$fetchdir}/apkg_{$filename}";
$static_output .= "\n" . str_repeat(" ", $dependlevel * 2 + 1) . "Downloading {$base_url}/{$filename} ... ";
if (download_file_with_progress_bar("{$base_url}/{$filename}", $fetchto) !== true) {
if ($base_url != $priv_url && download_file_with_progress_bar("{$priv_url}/{$filename}", $fetchto) !== true) {
@@ -498,8 +506,9 @@ function pkg_fetch_recursive($pkgname, $filename, $dependlevel = 0, $base_url =
}
}
}
+
$pkgaddout = "";
- exec("/usr/sbin/pkg_add -fv {$fetchto} 2>&1", $pkgaddout);
+ exec("{$pkgtmpdir}/usr/sbin/pkg_add {$pkgstaging} -fv {$fetchto} 2>&1", $pkgaddout);
pkg_debug($pkgname . " " . print_r($pkgaddout, true) . "\npkg_add successfully completed.\n");
return true;
diff --git a/etc/inc/upgrade_config.inc b/etc/inc/upgrade_config.inc
index 1828e7d..c87d1ad 100644
--- a/etc/inc/upgrade_config.inc
+++ b/etc/inc/upgrade_config.inc
@@ -584,7 +584,7 @@ function upgrade_039_to_040() {
$config['system']['group'][0]['name'] = "admins";
$config['system']['group'][0]['description'] = "System Administrators";
$config['system']['group'][0]['scope'] = "system";
- $config['system']['group'][0]['pages'] = "ANY";
+ $config['system']['group'][0]['priv'] = "page-all";
$config['system']['group'][0]['home'] = "index.php";
$config['system']['group'][0]['gid'] = "110";
@@ -820,15 +820,18 @@ function upgrade_044_to_045() {
global $config;
$iflist = get_configured_interface_list(false, true);
if (is_array($config['vlans']['vlan']) && count($config['vlans']['vlan'])) {
+ $i = 0;
foreach ($config['vlans']['vlan'] as $id => $vlan) {
- $config['vlans']['vlan'][$id]['vlanif'] = "{$vlan['if']}_vlan{$vlan['tag']}";
/* Make sure to update the interfaces section with the right name */
+ $vlan_name = "{$vlan['if']}_vlan{$vlan['tag']}";
foreach($iflist as $ifname) {
- if($config['interfaces'][$ifname]['if'] == "vlan{$id}") {
- $config['interfaces'][$ifname]['if'] = $vlan['vlanif'];
+ if($config['interfaces'][$ifname]['if'] == "vlan{$i}") {
+ $config['interfaces'][$ifname]['if'] = $vlan_name;
+ continue;
}
}
-
+ $config['vlans']['vlan'][$i]['vlanif'] = "{$vlan_name}";
+ $i++;
}
}
}
@@ -869,6 +872,8 @@ function upgrade_045_to_046() {
if(count($config['load_balancer']) == 0) {
unset($config['load_balancer']);
}
+ mwexec('/usr/sbin/pw groupadd -n _relayd -g 913');
+ mwexec('/usr/sbin/pw useradd -n _relayd -c "Relay Daemon" -d /var/empty -s /usr/sbin/nologin -u 913 -g 913');
}
@@ -917,6 +922,11 @@ function upgrade_046_to_047() {
if (isset($tunnel['disabled']))
$ph1ent['disabled'] = $tunnel['disabled'];
+ /* convert to the new vip[$vhid] name */
+ if(preg_match("/^carp/", $tunnel['interface'])) {
+ $carpid = str_replace("carp", "", $tunnel['interface']);
+ $tunnel['interface'] = "vip" . $config['virtualip']['vip'][$carpid]['vhid'];
+ }
$ph1ent['interface'] = $tunnel['interface'];
$ph1ent['remote-gateway'] = $tunnel['remote-gateway'];
$ph1ent['descr'] = $tunnel['descr'];
@@ -1681,7 +1691,7 @@ function upgrade_053_to_054() {
} else {
$i = 1;
}
- $gateway_group['item'][] = "$interface|$i";
+ $gateway_group['item'][] = "$static_name|$i";
}
$gateway_group_arr[] = $gateway_group;
} else {
OpenPOWER on IntegriCloud