aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config/avahi/avahi.inc2
-rw-r--r--config/freeradius2/freeradius.inc63
-rw-r--r--config/freeradius2/freeradius_view_config.php40
-rw-r--r--config/haproxy/haproxy.inc11
-rw-r--r--config/squid-reverse/squid.inc30
-rw-r--r--pkg_config.8.xml7
-rw-r--r--pkg_config.8.xml.amd647
7 files changed, 78 insertions, 82 deletions
diff --git a/config/avahi/avahi.inc b/config/avahi/avahi.inc
index 217d2aa1..0a8f573e 100644
--- a/config/avahi/avahi.inc
+++ b/config/avahi/avahi.inc
@@ -42,7 +42,7 @@ function avahi_install() {
conf_mount_rw();
if (php_uname("m") == "i386")
- $archive = (substr(trim(file_get_contents("/etc/version")),0,1) == "2") ? "avahi8.tar.gz" : "avahi.tar.gz";
+ $archive = (substr(trim(file_get_contents("/etc/version")),0,1) == "2") ? "" : "avahi.tar.gz";
// Extract out libraries and avahi-daemon
if(!empty($archive) && file_exists("/root/{$archive}")) {
diff --git a/config/freeradius2/freeradius.inc b/config/freeradius2/freeradius.inc
index 66921959..d2f42dfd 100644
--- a/config/freeradius2/freeradius.inc
+++ b/config/freeradius2/freeradius.inc
@@ -45,7 +45,25 @@ require_once("globals.inc");
require_once("filter.inc");
require_once("services.inc");
-define('RADDB', '/usr/local/etc/raddb');
+// Check to find out on which system the package is running
+if (exec("uname -r | cut -c 1-3") == '8.3') {
+ if (exec("uname -m") == "i386") {
+ define('RADDB', '/usr/pbi/freeradius-i386/etc/raddb');
+ define('USRLOCAL', '/usr/pbi/freeradius-i386');
+ }
+ else {
+ define('RADDB', '/usr/pbi/freeradius-amd64/etc/raddb');
+ define('USRLOCAL', '/usr/pbi/freeradius-amd64');
+ }
+}
+else {
+ define('RADDB', '/usr/local/etc/raddb');
+ define('USRLOCAL', '/usr/local');
+}
+// End of system check
+
+
+// define('RADDB', '/usr/local/etc/raddb');
function freeradius_deinstall_command() {
exec("cd /var/db/pkg && pkg_delete `ls | grep freeradius`");
@@ -64,7 +82,7 @@ function freeradius_install_command() {
exec("mkdir " . RADDB . "/scripts");
if (!file_exists("/var/log/radutmp")) { exec("touch /var/log/radutmp"); }
if (!file_exists("/var/log/radwtmp")) { exec("touch /var/log/radwtmp"); }
- exec("chown -R root:wheel " . RADDB . " && chown -R root:wheel /usr/local/lib/freeradius-2.1.12 && chown -R root:wheel /var/log/radacct");
+ exec("chown -R root:wheel " . RADDB . " && chown -R root:wheel " . USRLOCAL . "/lib/freeradius-2.1.12 && chown -R root:wheel /var/log/radacct");
// creating a backup file of the original policy.conf no matter if user checked this or not
if (!file_exists(RADDB . "/policy.conf.backup")) {
@@ -82,39 +100,6 @@ function freeradius_install_command() {
if (file_exists(RADDB . "/sites-enabled/control-socket")) { unlink(RADDB . "/sites-enabled/control-socket"); }
if (file_exists(RADDB . "/sites-enabled/inner-tunnel")) { unlink(RADDB . "/sites-enabled/inner-tunnel"); }
- // We need some additional files in /usr/local/lib for the LDAP module. We fetch these files dependent on the architecture.
- if (!file_exists("/usr/local/lib/libasn1.so.10") || !file_exists("/usr/local/lib/libgssapi.so.10") || !file_exists("/usr/local/lib/libheimntlm.so.10") || !file_exists("/usr/local/lib/libhx509.so.10") || !file_exists("/usr/local/lib/ldd/libkrb5.so.10") || !file_exists("/usr/local/lib/libroken.so.10")) {
- // For i386 systems
- if (exec("uname -m") == "i386") {
- exec("cd /usr/local/lib/ && fetch http://e-sac.siteseguro.ws/pfsense/8/All/ldd/libasn1.so.10");
- exec("cd /usr/local/lib/ && fetch http://e-sac.siteseguro.ws/pfsense/8/All/ldd/libgssapi.so.10");
- exec("cd /usr/local/lib/ && fetch http://e-sac.siteseguro.ws/pfsense/8/All/ldd/libheimntlm.so.10");
- exec("cd /usr/local/lib/ && fetch http://e-sac.siteseguro.ws/pfsense/8/All/ldd/libhx509.so.10");
- exec("cd /usr/local/lib/ && fetch http://e-sac.siteseguro.ws/pfsense/8/All/ldd/libkrb5.so.10");
- exec("cd /usr/local/lib/ && fetch http://e-sac.siteseguro.ws/pfsense/8/All/ldd/libroken.so.10");
- exec("chmod 0755 /usr/local/lib/libasn1.so.10");
- exec("chmod 0755 /usr/local/lib/libgssapi.so.10");
- exec("chmod 0755 /usr/local/lib/libheimntlm.so.10");
- exec("chmod 0755 /usr/local/lib/libhx509.so.10");
- exec("chmod 0755 /usr/local/lib/ldd/libkrb5.so.10");
- exec("chmod 0755 /usr/local/lib/libroken.so.10");
- }
- // For amd64 systems
- else {
- exec("cd /usr/local/lib/ && fetch http://e-sac.siteseguro.ws/pfsense/8/amd64/All/ldd/libasn1.so.10");
- exec("cd /usr/local/lib/ && fetch http://e-sac.siteseguro.ws/pfsense/8/amd64/All/ldd/libgssapi.so.10");
- exec("cd /usr/local/lib/ && fetch http://e-sac.siteseguro.ws/pfsense/8/amd64/All/ldd/libheimntlm.so.10");
- exec("cd /usr/local/lib/ && fetch http://e-sac.siteseguro.ws/pfsense/8/amd64/All/ldd/libhx509.so.10");
- exec("cd /usr/local/lib/ && fetch http://e-sac.siteseguro.ws/pfsense/8/amd64/All/ldd/libkrb5.so.10");
- exec("cd /usr/local/lib/ && fetch http://e-sac.siteseguro.ws/pfsense/8/amd64/All/ldd/libroken.so.10");
- exec("chmod 0755 /usr/local/lib/libasn1.so.10");
- exec("chmod 0755 /usr/local/lib/libgssapi.so.10");
- exec("chmod 0755 /usr/local/lib/libheimntlm.so.10");
- exec("chmod 0755 /usr/local/lib/libhx509.so.10");
- exec("chmod 0755 /usr/local/lib/ldd/libkrb5.so.10");
- exec("chmod 0755 /usr/local/lib/libroken.so.10");
- }
- }
// We run this here just to suppress some warnings on syslog if file doesn't exist
freeradius_authorizedmacs_resync();
@@ -139,8 +124,8 @@ function freeradius_install_command() {
$rcfile = array();
$rcfile['file'] = 'radiusd.sh';
- $rcfile['start'] = '/usr/local/etc/rc.d/radiusd onestart';
- $rcfile['stop'] = '/usr/local/etc/rc.d/radiusd onestop';
+ $rcfile['start'] = USRLOCAL . '/etc/rc.d/radiusd onestart';
+ $rcfile['stop'] = USRLOCAL . '/etc/rc.d/radiusd onestop';
write_rcfile($rcfile);
conf_mount_ro();
start_service("radiusd");
@@ -218,7 +203,7 @@ function freeradius_settings_resync() {
$conf .= <<<EOD
-prefix = /usr/local
+prefix = USRLOCAL
exec_prefix = \${prefix}
sysconfdir = \${prefix}/etc
localstatedir = /var
@@ -2600,7 +2585,7 @@ function freeradius_all_after_XMLRPC_resync() {
log_error("FreeRADIUS: Finished XMLRPC process. It should be OK. For more information look at the host which started sync.");
- exec("/usr/local/etc/rc.d/radiusd onerestart");
+ exec(USRLOCAL . "/etc/rc.d/radiusd onerestart");
}
function freeradius_modulescounter_resync() {
diff --git a/config/freeradius2/freeradius_view_config.php b/config/freeradius2/freeradius_view_config.php
index 6bda5f3e..ee7ca4c1 100644
--- a/config/freeradius2/freeradius_view_config.php
+++ b/config/freeradius2/freeradius_view_config.php
@@ -31,19 +31,35 @@
*/
require("guiconfig.inc");
+
+// Check to find out on which system the package is running
+if (exec("uname -r | cut -c 1-3") == '8.3') {
+ if (exec("uname -m") == "i386") {
+ define('RADDB', '/usr/pbi/freeradius-i386/etc/raddb');
+ }
+ else {
+ define('RADDB', '/usr/pbi/freeradius-amd64/etc/raddb');
+ }
+}
+else {
+ define('RADDB', '/usr/local/etc/raddb');
+}
+// End of system check
+
+
function get_file($file){
- $files['radiusd']="/usr/local/etc/raddb/radiusd.conf";
- $files['eap']="/usr/local/etc/raddb/eap.conf";
- $files['sql']="/usr/local/etc/raddb/sql.conf";
- $files['clients']="/usr/local/etc/raddb/clients.conf";
- $files['users']="/usr/local/etc/raddb/users";
- $files['macs']="/usr/local/etc/raddb/authorized_macs";
- $files['virtual-server-default']="/usr/local/etc/raddb/sites-enabled/default";
- $files['ca']="/usr/local/etc/raddb/certs/ca.cnf";
- $files['server']="/usr/local/etc/raddb/certs/server.cnf";
- $files['client']="/usr/local/etc/raddb/certs/client.cnf";
- $files['index']="/usr/local/etc/raddb/certs/index.txt";
- $files['ldap']="/usr/local/etc/raddb/modules/ldap";
+ $files['radiusd']=RADDB . "/radiusd.conf";
+ $files['eap']=RADDB . "/eap.conf";
+ $files['sql']=RADDB . "/sql.conf";
+ $files['clients']=RADDB . "/clients.conf";
+ $files['users']=RADDB . "/users";
+ $files['macs']=RADDB . "/authorized_macs";
+ $files['virtual-server-default']=RADDB . "/sites-enabled/default";
+ $files['ca']=RADDB . "/certs/ca.cnf";
+ $files['server']=RADDB . "/certs/server.cnf";
+ $files['client']=RADDB . "/certs/client.cnf";
+ $files['index']=RADDB . "/certs/index.txt";
+ $files['ldap']=RADDB . "/modules/ldap";
if ($files[$file]!="" && file_exists($files[$file])){
diff --git a/config/haproxy/haproxy.inc b/config/haproxy/haproxy.inc
index 4ed5f393..1e29f358 100644
--- a/config/haproxy/haproxy.inc
+++ b/config/haproxy/haproxy.inc
@@ -156,17 +156,6 @@ EOD;
fclose($fd);
exec("/etc/rc.d/devd restart");
- /* Workaround for the old package deleting the binary on unload instead of the package */
- if (!file_exists("/usr/local/sbin/haproxy")) {
- if (substr(trim(`uname -r`), 0, 1) == "8") {
- exec("cd /var/db/pkg && pkg_delete `ls | grep haproxy`");
- if (trim(`uname -m`) == 'i386')
- exec("pkg_add -r http://e-sac.siteseguro.ws/pfsense/8/All/haproxy-1.4.18.tbz");
- else
- exec("pkg_add -r http://e-sac.siteseguro.ws/pfsense/8/amd64/All/haproxy-1.4.18.tbz");
- }
- }
-
/* Do XML upgrade from haproxy 0.31 to haproxy-dev */
if (is_array($config['installedpackages']['haproxy']['ha_servers'])) {
/* We have an old config */
diff --git a/config/squid-reverse/squid.inc b/config/squid-reverse/squid.inc
index 47dd7124..e7dffcdb 100644
--- a/config/squid-reverse/squid.inc
+++ b/config/squid-reverse/squid.inc
@@ -41,6 +41,7 @@ if(!function_exists("filter_configure"))
require_once("filter.inc");
define('SQUID_CONFBASE', '/usr/local/etc/squid');
+define('SQUID_CONFFILE', SQUID_CONFBASE . '/squid.conf');
define('SQUID_BASE', '/var/squid/');
define('SQUID_ACLDIR', '/var/squid/acl');
define('SQUID_PASSWD', '/var/etc/squid.passwd');
@@ -102,12 +103,12 @@ function squid_dash_z() {
if(!is_dir($cachedir.'/00/')) {
log_error("Creating squid cache subdirs in $cachedir");
- mwexec("/usr/local/sbin/squid -k shutdown");
+ mwexec("/usr/local/sbin/squid -k shutdown -f " . SQUID_CONFFILE);
sleep(5);
- mwexec("/usr/local/sbin/squid -k kill");
+ mwexec("/usr/local/sbin/squid -k kill -f " . SQUID_CONFFILE);
// Double check permissions here, should be safe to recurse cache dir if it's small here.
mwexec("/usr/sbin/chown -R proxy:proxy $cachedir");
- mwexec("/usr/local/sbin/squid -z");
+ mwexec("/usr/local/sbin/squid -z -f " . SQUID_CONFFILE);
}
if(file_exists("/var/squid/cache/swap.state")) {
@@ -291,11 +292,11 @@ function squid_install_command() {
if (!is_service_running('squid')) {
update_status("Starting... One moment please...");
log_error("Starting Squid");
- mwexec_bg("/usr/local/sbin/squid -D");
+ mwexec_bg("/usr/local/sbin/squid -f " . SQUID_CONFFILE);
} else {
update_status("Reloading Squid for configuration sync... One moment please...");
log_error("Reloading Squid for configuration sync");
- mwexec("/usr/local/sbin/squid -k reconfigure");
+ mwexec("/usr/local/sbin/squid -k reconfigure -f " . SQUID_CONFFILE);
}
/* restart proxy alarm scripts */
@@ -682,7 +683,7 @@ function squid_install_cron($should_install) {
$cron_item['month'] = "*";
$cron_item['wday'] = "*";
$cron_item['who'] = "root";
- $cron_item['command'] = "/bin/rm {$cachedir}/swap.state; /usr/local/sbin/squid -k rotate";
+ $cron_item['command'] = "/bin/rm {$cachedir}/swap.state; /usr/local/sbin/squid -k rotate -f " . SQUID_CONFFILE;
$config['cron']['item'][] = $cron_item;
$need_write = true;
}
@@ -1389,12 +1390,12 @@ function squid_resync() {
if (!is_service_running('squid')) {
log_error("Starting Squid");
- mwexec("/usr/local/sbin/squid");
+ mwexec("/usr/local/sbin/squid -f " . SQUID_CONFFILE);
}
else {
if (!isset($boot_process)){
log_error("Reloading Squid for configuration sync");
- mwexec("/usr/local/sbin/squid -k reconfigure");
+ mwexec("/usr/local/sbin/squid -k reconfigure -f " . SQUID_CONFFILE);
}
}
@@ -1706,16 +1707,19 @@ function squid_generate_rules($type) {
}
function squid_write_rcfile() {
+ /* Declare a variable for the SQUID_CONFFILE constant. */
+ /* Then the variable can be referenced easily in the Heredoc text that generates the rc file. */
+ $squid_conffile_var = SQUID_CONFFILE;
$rc = array();
$rc['file'] = 'squid.sh';
$rc['start'] = <<<EOD
if [ -z "`ps auxw | grep "[s]quid "|awk '{print $2}'`" ];then
- /usr/local/sbin/squid
+ /usr/local/sbin/squid -f $squid_conffile_var
fi
EOD;
$rc['stop'] = <<<EOD
-/usr/local/sbin/squid -k shutdown
+/usr/local/sbin/squid -k shutdown -f $squid_conffile_var
# Just to be sure...
sleep 5
killall -9 squid 2>/dev/null
@@ -1724,9 +1728,9 @@ killall pinger 2>/dev/null
EOD;
$rc['restart'] = <<<EOD
if [ -z "`ps auxw | grep "[s]quid "|awk '{print $2}'`" ];then
- /usr/local/sbin/squid
+ /usr/local/sbin/squid -f $squid_conffile_var
else
- /usr/local/sbin/squid -k reconfigure
+ /usr/local/sbin/squid -k reconfigure -f $squid_conffile_var
fi
EOD;
@@ -1856,4 +1860,4 @@ function squid_do_xmlrpc_sync($sync_to_ip, $username, $password) {
}
-?>
+?> \ No newline at end of file
diff --git a/pkg_config.8.xml b/pkg_config.8.xml
index 975ad6e4..27879142 100644
--- a/pkg_config.8.xml
+++ b/pkg_config.8.xml
@@ -451,7 +451,7 @@
<descr>The olsr.org OLSR daemon is an implementation of the Optimized Link State Routing protocol. OLSR is a routing protocol for mobile ad-hoc networks. The protocol is pro-active, table driven and utilizes a technique called multipoint relaying for message flooding.</descr>
<category>Services</category>
<config_file>http://www.pfsense.com/packages/config/olsrd.xml</config_file>
- <depends_on_package_base_url>http://files.pfsense.org/packages/All/</depends_on_package_base_url>
+ <depends_on_package_base_url>http://files.pfsense.org/packages/8/All/</depends_on_package_base_url>
<depends_on_package>olsrd-0.6.2.tbz</depends_on_package>
<depends_on_package_pbi>olsrd-0.6.3-i386.pbi</depends_on_package_pbi>
<build_port_path>/usr/ports/net/olsrd</build_port_path>
@@ -1005,8 +1005,8 @@
<depends_on_package>freeradius-2.1.12_1.tbz</depends_on_package>
<depends_on_package_pbi>freeradius-2.1.12_1-i386.pbi</depends_on_package_pbi>
<depends_on_package>mysql-client-5.1.63.tbz</depends_on_package>
- <depends_on_package>postgresql-client-9.0.8.tbz</depends_on_package>
- <depends_on_package>openldap-sasl-client-2.4.31_1.tbz</depends_on_package>
+ <depends_on_package>postgresql-client-8.4.12.tbz</depends_on_package>
+ <depends_on_package>openldap-sasl-client-2.4.23.tbz</depends_on_package>
<config_file>http://www.pfsense.org/packages/config/freeradius2/freeradius.xml</config_file>
<configurationfile>freeradius.xml</configurationfile>
<after_install_info>Please visit Services: FreeRADIUS</after_install_info>
@@ -1145,6 +1145,7 @@
<maintainer>marcellocoutinho@gmail.com fernando@netfilter.com.br seth.mos@dds.nl mfuchs77@googlemail.com jimp@pfsense.org</maintainer>
<depends_on_package_base_url>http://files.pfsense.org/packages/8/All/</depends_on_package_base_url>
<depends_on_package>squid-3.1.20.tbz</depends_on_package>
+ <depends_on_package>libwww-5.4.0_4.tbz</depends_on_package>
<build_port_path>/usr/ports/www/squid31</build_port_path>
<build_options>WITH_SQUID_KERB_AUTH=true WITH_SQUID_LDAP_AUTH=true WITH_SQUID_NIS_AUTH=true WITH_SQUID_SASL_AUTH=true WITH_SQUID_IPV6=true WITH_SQUID_DELAY_POOLS=true WITH_SQUID_SNMP=true WITH_SQUID_SSL=true WITH_SQUID_SSL_CRTD=true WITH_SQUID_PINGER=true WITHOUT_SQUID_DNS_HELPER=true WITH_SQUID_HTCP=true WITH_SQUID_VIA_DB=true WITH_SQUID_CACHE_DIGESTS=true WITHOUT_SQUID_WCCP=true WITH_SQUID_WCCPV2=true WITHOUT_SQUID_STRICT_HTTP=true WITH_SQUID_IDENT=true WITH_SQUID_REFERER_LOG=true WITH_SQUID_USERAGENT_LOG=true WITH_SQUID_ARP_ACL=true WITH_SQUID_IPFW=true WITH_SQUID_PF=true WITHOUT_SQUID_IPFILTER=true WITH_SQUID_FOLLOW_XFF=true WITHOUT_SQUID_ECAP=true WITHOUT_SQUID_ICAP=true WITHOUT_SQUID_ESI=true WITH_SQUID_AUFS=true WITHOUT_SQUID_COSS=true WITHOUT_SQUID_KQUEUE=true WITH_SQUID_LARGEFILE=true WITHOUT_SQUID_STACKTRACES=true WITHOUT_SQUID_DEBUG=true</build_options>
<config_file>http://www.pfsense.org/packages/config/squid-reverse/squid.xml</config_file>
diff --git a/pkg_config.8.xml.amd64 b/pkg_config.8.xml.amd64
index 9fd917e1..bfb3af72 100644
--- a/pkg_config.8.xml.amd64
+++ b/pkg_config.8.xml.amd64
@@ -127,6 +127,7 @@
<maintainer>fernando@netfilter.com.br seth.mos@dds.nl mfuchs77@googlemail.com jimp@pfsense.org</maintainer>
<depends_on_package_base_url>http://files.pfsense.org/packages/amd64/8/All/</depends_on_package_base_url>
<depends_on_package>squid-3.1.20.tbz</depends_on_package>
+ <depends_on_package>libwww-5.4.0_4.tbz</depends_on_package>
<build_port_path>/usr/ports/www/squid31</build_port_path>
<build_options>WITH_SQUID_KERB_AUTH=true WITH_SQUID_LDAP_AUTH=true WITH_SQUID_NIS_AUTH=true WITH_SQUID_SASL_AUTH=true WITH_SQUID_IPV6=true WITH_SQUID_DELAY_POOLS=true WITH_SQUID_SNMP=true WITH_SQUID_SSL=true WITH_SQUID_SSL_CRTD=true WITH_SQUID_PINGER=true WITHOUT_SQUID_DNS_HELPER=true WITH_SQUID_HTCP=true WITH_SQUID_VIA_DB=true WITH_SQUID_CACHE_DIGESTS=true WITHOUT_SQUID_WCCP=true WITH_SQUID_WCCPV2=true WITHOUT_SQUID_STRICT_HTTP=true WITH_SQUID_IDENT=true WITH_SQUID_REFERER_LOG=true WITH_SQUID_USERAGENT_LOG=true WITH_SQUID_ARP_ACL=true WITH_SQUID_IPFW=true WITH_SQUID_PF=true WITHOUT_SQUID_IPFILTER=true WITH_SQUID_FOLLOW_XFF=true WITHOUT_SQUID_ECAP=true WITHOUT_SQUID_ICAP=true WITHOUT_SQUID_ESI=true WITH_SQUID_AUFS=true WITHOUT_SQUID_COSS=true WITHOUT_SQUID_KQUEUE=true WITH_SQUID_LARGEFILE=true WITHOUT_SQUID_STACKTRACES=true WITHOUT_SQUID_DEBUG=true</build_options>
<depends_on_package_pbi>squid-3.1.20-amd64.pbi</depends_on_package_pbi>
@@ -531,9 +532,9 @@
<descr>The olsr.org OLSR daemon is an implementation of the Optimized Link State Routing protocol. OLSR is a routing protocol for mobile ad-hoc networks. The protocol is pro-active, table driven and utilizes a technique called multipoint relaying for message flooding.</descr>
<category>Services</category>
<config_file>http://www.pfsense.com/packages/config/olsrd.xml</config_file>
- <depends_on_package_base_url>http://files.pfsense.org/packages/All/</depends_on_package_base_url>
+ <depends_on_package_base_url>http://files.pfsense.org/packages/amd64/8/All/</depends_on_package_base_url>
<depends_on_package>olsrd-0.6.2.tbz</depends_on_package>
- <depends_on_package_pbi>olsrd-0.6.3-i386.pbi</depends_on_package_pbi>
+ <depends_on_package_pbi>olsrd-0.6.3-amd64.pbi</depends_on_package_pbi>
<build_port_path>/usr/ports/net/olsrd</build_port_path>
<version>1.0</version>
<status>Stable</status>
@@ -1034,7 +1035,7 @@
<status>RC1</status>
<required_version>2.0</required_version>
<maintainer>nachtfalkeaw@web.de</maintainer>
- <depends_on_package_base_url>http://files.pfsense.org/packages/8/All/</depends_on_package_base_url>
+ <depends_on_package_base_url>http://files.pfsense.org/packages/amd64/8/All/</depends_on_package_base_url>
<depends_on_package>freeradius-2.1.12_1.tbz</depends_on_package>
<depends_on_package_pbi>freeradius-2.1.12_1-amd64.pbi</depends_on_package_pbi>
<depends_on_package>mysql-client-5.1.63.tbz</depends_on_package>