Skip to content

Commit

Permalink
syslog-ng: alternative for logread
Browse files Browse the repository at this point in the history
When the syslog-ng installed it records all messages to /var/log/messages.
This makes the default OpenWrt's ubox /sbin/logread useless and return nothing.

The logread script was added to the syslog-ng as a shim.
It's based on `tail /var/log/messages` and repeats basic options that the ubox logread have.
The script is installed instead of the /sbin/logread and this is causes an error.

Instead install it to /usr/libexec/logread.sh and specify as an alternative /sbin/logread.

The ubox logread also needs to be made as alternative in /usr/libexec/logread-ubox.

So we need to give it a separate name.
The most simple and clear would be logread-shell or just logread.sh.

Suggested-by: Andreas Gnau <[email protected]>
Signed-off-by: Sergey Ponomarev <[email protected]>
  • Loading branch information
stokito authored and BKPepe committed Nov 24, 2024
1 parent 8afc26f commit 641ec2b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions admin/syslog-ng/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk

PKG_NAME:=syslog-ng
PKG_VERSION:=4.7.1
PKG_RELEASE:=1
PKG_RELEASE:=2

PKG_MAINTAINER:=Josef Schlehofer <[email protected]>
PKG_LICENSE:=LGPL-2.1-or-later GPL-2.0-or-later
Expand Down Expand Up @@ -35,6 +35,7 @@ define Package/syslog-ng
TITLE:=A powerful syslog daemon
URL:=https://www.syslog-ng.com/products/open-source-log-management/
DEPENDS:=+libpcre2 +glib2 +libopenssl +libpthread +librt +libdbi +libjson-c +libcurl +libuuid +SYSLOGNG_LOGROTATE:logrotate +LIBCURL_ZLIB:zlib
ALTERNATIVES:=300:/sbin/logread:/usr/libexec/logread.sh
endef

define Package/syslog-ng/description
Expand Down Expand Up @@ -123,8 +124,8 @@ define Package/syslog-ng/install
$(INSTALL_DATA) ./files/syslog-ng.conf $(1)/etc
touch $(1)/etc/syslog-ng.d/.keep

$(INSTALL_DIR) $(1)/sbin
$(INSTALL_BIN) ./files/logread $(1)/sbin
$(INSTALL_DIR) $(1)/usr/libexec
$(INSTALL_BIN) ./files/logread.sh $(1)/usr/libexec/logread.sh

$(INSTALL_DIR) $(1)/usr/share/syslog-ng/include/
$(CP) -r ./files/scl $(1)/usr/share/syslog-ng/include/
Expand Down
File renamed without changes.

0 comments on commit 641ec2b

Please sign in to comment.