summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlbert Antony <albert@newtec.dk>2015-07-15 14:56:34 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2015-07-16 14:50:48 +0200
commit6d8a0d892ec05208671e919efea933f48e913dd7 (patch)
tree6afde8d2fbd549f00bbee75a4b152dc27831efec
parent369bbfeb9bea868cc717c96c00eb1411b071b57c (diff)
downloadptxdist-6d8a0d892ec05208671e919efea933f48e913dd7.tar.gz
ptxdist-6d8a0d892ec05208671e919efea933f48e913dd7.tar.xz
busybox: add crond systemd service
Hopefully the tabs are preserved in this version of the patch ;) Signed-off-by: Albert Antony <albert@newtec.dk> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r--projectroot/lib/systemd/system/crond.service11
-rw-r--r--rules/busybox.in6
-rw-r--r--rules/busybox.make7
3 files changed, 24 insertions, 0 deletions
diff --git a/projectroot/lib/systemd/system/crond.service b/projectroot/lib/systemd/system/crond.service
new file mode 100644
index 000000000..b650ae520
--- /dev/null
+++ b/projectroot/lib/systemd/system/crond.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Cron Daemon
+After=syslog.service
+
+[Service]
+Type=forking
+ExecStart=/usr/sbin/crond -b
+Restart=always
+
+[Install]
+WantedBy=multi-user.target
diff --git a/rules/busybox.in b/rules/busybox.in
index 7a41e7c9a..7bcdc9450 100644
--- a/rules/busybox.in
+++ b/rules/busybox.in
@@ -90,6 +90,12 @@ config BUSYBOX_TELNETD_SYSTEMD_UNIT
depends on BUSYBOX_TELNETD && SYSTEMD
prompt "telnetd systemd service files"
+config BUSYBOX_CROND_SYSTEMD_UNIT
+ bool
+ default y
+ depends on BUSYBOX_CROND && SYSTEMD
+ prompt "crond systemd service files"
+
comment "---"
source "config/busybox/Config.in"
diff --git a/rules/busybox.make b/rules/busybox.make
index 60191c202..d2c999040 100644
--- a/rules/busybox.make
+++ b/rules/busybox.make
@@ -224,6 +224,13 @@ ifdef PTXCONF_BUSYBOX_TELNETD_SYSTEMD_UNIT
/lib/systemd/system/sockets.target.wants/telnetd.socket)
endif
+ifdef PTXCONF_BUSYBOX_CROND_SYSTEMD_UNIT
+ @$(call install_alternative, busybox, 0, 0, 0644, \
+ /lib/systemd/system/crond.service)
+ @$(call install_link, busybox, ../crond.service, \
+ /lib/systemd/system/multi-user.target.wants/crond.service)
+endif
+
# #
# # config files
# #