aboutsummaryrefslogtreecommitdiffstats
path: root/package/utils/busybox/Makefile
diff options
context:
space:
mode:
authorPhilip Prindeville <philipp@redfish-solutions.com>2021-05-05 17:43:55 -0600
committerPaul Spooren <mail@aparcar.org>2021-05-19 15:50:50 +0200
commitb810d649fb276e7bea276ebf73cd2a76a089082b (patch)
tree797453d9b3d4a014e5dbbfd4d474eac78a185304 /package/utils/busybox/Makefile
parentb36b8b6929c6d6b17edddfb4597cf6a26a991ed0 (diff)
downloadupstream-b810d649fb276e7bea276ebf73cd2a76a089082b.tar.gz
upstream-b810d649fb276e7bea276ebf73cd2a76a089082b.tar.bz2
upstream-b810d649fb276e7bea276ebf73cd2a76a089082b.zip
busybox: preserve crontabs
/etc/syslog.conf is used by sysklogd, and /etc/crontabs is used by crond, both features of busybox. Given this, ownership for these files should be bound to busybox, especially if one day there's a way to do an in-place opkg update of busybox. There's also the busybox provided syslogd which uses this file if CONFIG_BUSYBOX_FEATURE_SYSLOGD_CFG is set. Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
Diffstat (limited to 'package/utils/busybox/Makefile')
-rw-r--r--package/utils/busybox/Makefile21
1 files changed, 18 insertions, 3 deletions
diff --git a/package/utils/busybox/Makefile b/package/utils/busybox/Makefile
index c2f1c1be45..1e7d9dd333 100644
--- a/package/utils/busybox/Makefile
+++ b/package/utils/busybox/Makefile
@@ -73,14 +73,25 @@ define Package/busybox/config
source "$(SOURCE)/Config.in"
endef
-ifdef CONFIG_BUSYBOX_CONFIG_FEATURE_SYSLOG
-define Package/busybox/conffiles
+ifneq ($(CONFIG_BUSYBOX_$(BUSYBOX_SYM)_FEATURE_SYSLOG)$(CONFIG_BUSYBOX_$(BUSYBOX_SYM)_FEATURE_SYSLOGD_CFG),)
+define Package/busybox/conffiles/syslog
/etc/syslog.conf
endef
+endif
-Package/busybox-selinux/conffiles = $(Package/busybox/conffiles)
+ifneq ($(CONFIG_BUSYBOX_$(BUSYBOX_SYM)_CROND),)
+define Package/busybox/conffiles/crond
+/etc/crontabs/
+endef
endif
+define Package/busybox/conffiles
+$(Package/busybox/conffiles/syslog)
+$(Package/busybox/conffiles/crond)
+endef
+
+Package/busybox-selinux/conffiles = $(Package/busybox/conffiles)
+
ifndef CONFIG_USE_MUSL
LDLIBS:=m crypt
endif
@@ -129,8 +140,12 @@ define Package/busybox/install
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_DIR) $(1)/usr/sbin
$(CP) $(PKG_INSTALL_DIR)/* $(1)/
+ifneq ($(CONFIG_BUSYBOX_$(BUSYBOX_SYM)_FEATURE_SYSLOG)$(CONFIG_BUSYBOX_$(BUSYBOX_SYM)_FEATURE_SYSLOGD_CFG),)
+ touch $(1)/etc/syslog.conf
+endif
ifneq ($(CONFIG_BUSYBOX_$(BUSYBOX_SYM)_CROND),)
$(INSTALL_BIN) ./files/cron $(1)/etc/init.d/cron
+ $(INSTALL_DIR) $(1)/etc/crontabs
endif
ifneq ($(CONFIG_BUSYBOX_$(BUSYBOX_SYM)_NTPD),)
$(INSTALL_BIN) ./files/sysntpd $(1)/etc/init.d/sysntpd