From 3a538fb1978b458d9f34db345483dddbc742385a Mon Sep 17 00:00:00 2001 From: Ad Schellevis Date: Mon, 17 Aug 2020 12:07:18 +0200 Subject: [PATCH] Syslog: rename syslog service description and hide legacy mode when not enabled. ref https://github.com/opnsense/core/issues/4263 --- src/etc/inc/plugins.inc.d/core.inc | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/src/etc/inc/plugins.inc.d/core.inc b/src/etc/inc/plugins.inc.d/core.inc index e6d34942f..11717acdd 100644 --- a/src/etc/inc/plugins.inc.d/core.inc +++ b/src/etc/inc/plugins.inc.d/core.inc @@ -79,19 +79,21 @@ function core_services() 'name' => 'login', ); - $services[] = array( - 'description' => gettext('Local Syslog'), - 'php' => array( - "stop" => array('system_syslogd_stop'), - "start" => array('system_syslogd_start'), - "restart" => array('system_syslogd_start') - ), - 'pidfile' => '/var/run/syslog.pid', - 'name' => 'syslogd', - ); + if (empty($config['syslog']['disable_clog'])) { + $services[] = array( + 'description' => gettext('Local Syslog (legacy mode)'), + 'php' => array( + "stop" => array('system_syslogd_stop'), + "start" => array('system_syslogd_start'), + "restart" => array('system_syslogd_start') + ), + 'pidfile' => '/var/run/syslog.pid', + 'name' => 'syslogd', + ); + } $services[] = array( - 'description' => gettext('Remote Syslog'), + 'description' => gettext('Syslog'), 'php' => array( "stop" => array('system_syslogd_stop'), "start" => array('system_syslogd_start'),