summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergey Ponomarev <stokito@gmail.com>2024-03-02 23:50:58 +0200
committerChuanhong Guo <gch981213@gmail.com>2024-03-08 15:38:37 +0800
commit9da90971ab32c29eb014eea7094d0b4ebdf256e3 (patch)
tree669b0a1d329aec438c914849235a718f07b7c43c
parent8d355b870a9d88a052a49005ba2c811bc6810197 (diff)
downloadopenwrt-9da90971ab32c29eb014eea7094d0b4ebdf256e3.tar.gz
openwrt-9da90971ab32c29eb014eea7094d0b4ebdf256e3.tar.bz2
openwrt-9da90971ab32c29eb014eea7094d0b4ebdf256e3.zip
ubox: make logread as an alternative
The logread can be replaced with syslog-ng. To support this it should be an alternative itself. Signed-off-by: Sergey Ponomarev <stokito@gmail.com>
-rw-r--r--package/system/ubox/Makefile8
1 files changed, 5 insertions, 3 deletions
diff --git a/package/system/ubox/Makefile b/package/system/ubox/Makefile
index e74ae00b3f..adfb68e55b 100644
--- a/package/system/ubox/Makefile
+++ b/package/system/ubox/Makefile
@@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=ubox
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(PROJECT_GIT)/project/ubox.git
@@ -47,6 +47,7 @@ define Package/logd
DEPENDS:=+libubox +libubus +libblobmsg-json +libudebug
TITLE:=OpenWrt system log implementation
USERID:=logd=514:logd=514
+ ALTERNATIVES:=200:/sbin/logread:/usr/libexec/logread-ubox
endef
define Package/getrandom/install
@@ -63,9 +64,10 @@ define Package/ubox/install
endef
define Package/logd/install
- $(INSTALL_DIR) $(1)/sbin $(1)/etc/init.d/ $(1)/usr/share/acl.d
+ $(INSTALL_DIR) $(1)/sbin $(1)/usr/libexec/ $(1)/etc/init.d/ $(1)/usr/share/acl.d
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{logd,logread} $(1)/sbin/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/logd $(1)/sbin/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/logread $(1)/usr/libexec/logread-ubox
$(INSTALL_BIN) ./files/log.init $(1)/etc/init.d/log
$(INSTALL_DATA) ./files/logd.json $(1)/usr/share/acl.d
endef