From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-yk0-f174.google.com ([209.85.160.174]) by metis.ext.pengutronix.de with esmtps (TLS1.2:RSA_ARCFOUR_SHA1:128) (Exim 4.80) (envelope-from ) id 1ZCsC3-0005aG-Au for ptxdist@pengutronix.de; Wed, 08 Jul 2015 18:27:31 +0200 Received: by ykeo3 with SMTP id o3so94731912yke.0 for ; Wed, 08 Jul 2015 11:27:17 -0700 (PDT) MIME-Version: 1.0 Date: Wed, 8 Jul 2015 20:27:16 +0200 Message-ID: From: Albert Antony Subject: [ptxdist] [PATCH] busybox: add crond systemd service List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Content-Type: multipart/mixed; boundary="===============1007537068==" Errors-To: ptxdist-bounces@pengutronix.de Sender: "ptxdist" To: ptxdist@pengutronix.de --===============1007537068== Content-Type: multipart/alternative; boundary=001a114d8e66de0cea051a61497b --001a114d8e66de0cea051a61497b Content-Type: text/plain; charset=UTF-8 Signed-off-by: Albert Antony --- projectroot/lib/systemd/system/crond.service | 11 +++++++++++ rules/busybox.in | 6 ++++++ rules/busybox.make | 7 +++++++ 3 files changed, 24 insertions(+) create mode 100644 projectroot/lib/systemd/system/crond.service diff --git a/projectroot/lib/systemd/system/crond.service b/projectroot/lib/systemd/system/crond.service new file mode 100644 index 0000000..b650ae5 --- /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 7a41e7c..7bcdc94 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 60191c2..d2c9990 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 # # -- 2.0.0 --001a114d8e66de0cea051a61497b Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

Signed-off-by: Albert Antony <albert@newtec.dk>
---
=C2=A0pr= ojectroot/lib/systemd/system/crond.service | 11 +++++++++++
=C2= =A0rules/busybox.in =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 | =C2=A06 ++++++
=C2=A0rules/busybox.make = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 | =C2=A07 +++++++
=C2=A03 files changed, 24 ins= ertions(+)
=C2=A0create mode 100644 projectroot/lib/systemd/syste= m/crond.service

diff --git a/projectroot/lib/syste= md/system/crond.service b/projectroot/lib/systemd/system/crond.service
new file mode 100644
index 0000000..b650ae5
--- /= dev/null
+++ b/projectroot/lib/systemd/system/crond.service
=
@@ -0,0 +1,11 @@
+[Unit]
+Description=3DCron Daemo= n
+After=3Dsyslog.service
+
+[Service]
<= div>+Type=3Dforking
+ExecStart=3D/usr/sbin/crond -b
+Re= start=3Dalways
+
+[Install]
+WantedBy=3Dmulti= -user.target
diff --git a/rules/busybox.in b/rules/busybox.in
index 7a41e7c..7bcdc94 100644
--- a/rules/busybox.in
@@ -90,6 +90,12 @@ config BUSYBOX_TELNETD_SYSTEMD_UNI= T
=C2=A0 depends on B= USYBOX_TELNETD && SYSTEMD
=C2=A0 prompt "telnetd systemd service files"
<= div>=C2=A0
+config BUSYBOX_CROND_SYSTEMD_UNIT
+ bool
+ default y
+ depends on BUSYBOX_CROND && SYSTEMD
+ prompt "crond systemd service f= iles"
+
=C2=A0comment "---"
= =C2=A0
=C2=A0source "config/busybox/Config.in"
diff --git a/rules/busybox.make b/rules/busybox.make
index 6019= 1c2..d2c9990 100644
--- a/rules/busybox.make
+++ b/rule= s/busybox.make
@@ -224,6 +224,13 @@ ifdef PTXCONF_BUSYBOX_TELNETD= _SYSTEMD_UNIT
=C2=A0 /lib/systemd/system/sockets.target.wants/telnetd.socket)
=C2=A0e= ndif
=C2=A0
+ifdef PTXCONF_BUSYBOX_CROND_SYSTEMD_UNIT
+ @$(call install_alte= rnative, busybox, 0, 0, 0644, \
+ /lib/systemd/system/crond.service)
+ @$(call install_link, busybox, ../crond.servi= ce, \
+ /lib/systemd= /system/multi-user.target.wants/crond.service)
+endif
+=
=C2=A0# #
= =C2=A0# # config files
=C2=A0# #
--=C2=A0
2.0.0

--001a114d8e66de0cea051a61497b-- --===============1007537068== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline LS0gCnB0eGRpc3QgbWFpbGluZyBsaXN0CnB0eGRpc3RAcGVuZ3V0cm9uaXguZGUK --===============1007537068==--