From 425e547428e4dd58d82b1dcd19ccd60cabf920a4 Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Mon, 9 Feb 2015 14:47:48 -0200 Subject: 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 --- config/syslog-ng/syslog-ng.inc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'config/syslog-ng') 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') { -- cgit v1.2.3