aboutsummaryrefslogtreecommitdiffstats
path: root/config/syslog-ng
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2015-02-09 14:47:48 -0200
committerRenato Botelho <garga@FreeBSD.org>2015-02-09 14:47:48 -0200
commit425e547428e4dd58d82b1dcd19ccd60cabf920a4 (patch)
tree284d6e3e2e8801907ec9cbc388373e0eda4a3b3e /config/syslog-ng
parente8721f705ab1f80b0e1fe897f65b3941e071ebcf (diff)
downloadpfsense-packages-425e547428e4dd58d82b1dcd19ccd60cabf920a4.tar.gz
pfsense-packages-425e547428e4dd58d82b1dcd19ccd60cabf920a4.tar.bz2
pfsense-packages-425e547428e4dd58d82b1dcd19ccd60cabf920a4.zip
Attempt to fix syslog-ng creating a symlink of lib/syslog-ng on /usr/local/lib. While here, move config version to 3.6 and bump package to 1.0.3
Diffstat (limited to 'config/syslog-ng')
-rw-r--r--config/syslog-ng/syslog-ng.inc9
1 files changed, 8 insertions, 1 deletions
diff --git a/config/syslog-ng/syslog-ng.inc b/config/syslog-ng/syslog-ng.inc
index e373f62e..aaf3af9b 100644
--- a/config/syslog-ng/syslog-ng.inc
+++ b/config/syslog-ng/syslog-ng.inc
@@ -37,6 +37,9 @@ require_once('service-utils.inc');
if(!function_exists("filter_configure"))
require_once("filter.inc");
+if (!defined("SYSLOGNG_BSEDIR"))
+ define("SYSLOGNG_BASEDIR", "/usr/pbi/syslog-ng-" . php_uname("m") . "/");
+
function syslogng_get_real_interface_address($interface) {
$interface = convert_friendly_interface_to_real_interface_name($interface);
$line = trim(shell_exec("ifconfig $interface | grep inet | grep -v inet6 | awk '{ print \$2, \$4 }'"));
@@ -47,6 +50,8 @@ function syslogng_get_real_interface_address($interface) {
function syslogng_install_command() {
conf_mount_rw();
+ if (!file_exists("/usr/local/lib/syslog-ng"))
+ @symlink("/usr/local/lib/syslog-ng", SYSLOGNG_BSEDIR . "local/lib/syslog-ng");
syslogng_install_cron(true);
conf_mount_ro();
syslogng_resync();
@@ -56,6 +61,8 @@ function syslogng_deinstall_command() {
conf_mount_rw();
exec("/usr/local/etc/rc.d/syslog-ng.sh stop");
unlink_if_exists("/usr/local/etc/rc.d/syslog-ng.sh");
+ if (is_link("/usr/local/lib/syslog-ng"))
+ unlink_if_exists("/usr/local/lib/syslog-ng");
syslogng_install_cron(false);
conf_mount_ro();
filter_configure();
@@ -249,7 +256,7 @@ function syslogng_get_log_files($objects) {
function syslogng_build_conf($objects) {
$conf = "# This file is automatically generated by pfSense\n";
$conf .= "# Do not edit manually !\n";
- $conf .= "@version:3.5\n";
+ $conf .= "@version:3.6\n";
foreach($objects as $object) {
if($object['objecttype'] == 'log' || $object['objecttype'] == 'options') {