[OpenWrt-Devel] [PATCH] ubox: make system log support as a selectable option

Andrej Vlasic andrej.vlasic at sartura.hr
Fri Apr 22 19:11:16 EDT 2016


Currently system log is always included as a part of ubox.
Add a config option to optionally exclude system log from ubox package.

Signed-off-by: Andrej Vlasic <andrej.vlasic at sartura.hr>
---
 package/system/ubox/Makefile | 20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)

diff --git a/package/system/ubox/Makefile b/package/system/ubox/Makefile
index b32c794..70a9273 100644
--- a/package/system/ubox/Makefile
+++ b/package/system/ubox/Makefile
@@ -26,13 +26,29 @@ define Package/ubox
   CATEGORY:=Base system
   DEPENDS:=+libubox +ubusd +ubus +libubus +libuci +USE_GLIBC:librt
   TITLE:=OpenWrt system helper toolbox
+  MENU:=1
+endef
+
+define Package/ubox/config
+config UBOX_LOGD
+  bool
+  default y
+  depends on PACKAGE_ubox
+  prompt "Include system log implementation"
+  help
+	Include system log implementation which is implemented as part of ubox project.
 endef
 
 define Package/ubox/install
-	$(INSTALL_DIR) $(1)/sbin $(1)/usr/sbin $(1)/lib/ $(1)/etc/init.d/
+	$(INSTALL_DIR) $(1)/sbin $(1)/usr/sbin $(1)/lib/
 
-	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{kmodloader,logd,logread,validate_data} $(1)/sbin/
+	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{kmodloader,validate_data} $(1)/sbin/
+  ifeq ($(CONFIG_UBOX_LOGD),y)
+	$(INSTALL_DIR) $(1)/etc/init.d/
+	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{logd,logread} $(1)/sbin/
 	$(INSTALL_BIN) ./files/log.init $(1)/etc/init.d/log
+  endif
+
 	$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libvalidate.so $(1)/lib
 
 	$(LN) ../../sbin/kmodloader $(1)/usr/sbin/rmmod
-- 
2.8.0
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list