kumquat-buildroot/package/dcron/dcron.mk
Alvaro G. M 994e9fa72e dcron: provide init script
dcron doesn't create a pid file, so we run it in foreground but make
start-stop-daemon create the pidfile and move the daemon to background.

Give it a number greater than exim's init script, so job output email
can be sent.

[Thomas: as suggested by Yann E. Morin, use DCRON_INSTALL_INIT_SYSV.]

Signed-off-by: Alvaro G. M <alvaro.gamez@hazent.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-07-17 20:59:46 +02:00

37 lines
1.3 KiB
Makefile

################################################################################
#
# dcron
#
################################################################################
DCRON_VERSION = 4.5
DCRON_SITE = http://www.jimpryor.net/linux/releases/
# The source code does not specify the version of the GPL that is used.
DCRON_LICENSE = GPL
# Overwrite cron-related Busybox commands if available
ifeq ($(BR2_PACKAGE_BUSYBOX),y)
DCRON_DEPENDENCIES = busybox
endif
define DCRON_BUILD_CMDS
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS)
endef
define DCRON_INSTALL_TARGET_CMDS
$(INSTALL) -D -m0700 $(@D)/crond $(TARGET_DIR)/usr/sbin/crond
$(INSTALL) -D -m4755 $(@D)/crontab $(TARGET_DIR)/usr/bin/crontab
$(INSTALL) -D -m0644 $(@D)/extra/root.crontab $(TARGET_DIR)/etc/cron.d/system
# Busybox provides run-parts, so there is no need to use nor install provided run-cron
$(SED) 's#/usr/sbin/run-cron#/bin/run-parts#g' $(TARGET_DIR)/etc/cron.d/system
$(INSTALL) -d -m0755 $(TARGET_DIR)/var/spool/cron/crontabs \
$(TARGET_DIR)/etc/cron.daily $(TARGET_DIR)/etc/cron.hourly \
$(TARGET_DIR)/etc/cron.monthly $(TARGET_DIR)/etc/cron.weekly
endef
define DCRON_INSTALL_INIT_SYSV
$(INSTALL) -D -m 0755 package/dcron/S90dcron $(TARGET_DIR)/etc/init.d/S90dcron
endef
$(eval $(generic-package))