From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-yk0-f169.google.com ([209.85.160.169]) by metis.ext.pengutronix.de with esmtps (TLS1.2:RSA_ARCFOUR_SHA1:128) (Exim 4.80) (envelope-from ) id 1ZCsA8-0005HH-EB for ptxdist@pengutronix.de; Wed, 08 Jul 2015 18:25:32 +0200 Received: by ykey15 with SMTP id y15so18982500yke.3 for ; Wed, 08 Jul 2015 11:25:17 -0700 (PDT) MIME-Version: 1.0 Date: Wed, 8 Jul 2015 20:25:17 +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="===============0164653753==" Errors-To: ptxdist-bounces@pengutronix.de Sender: "ptxdist" To: ptxdist@pengutronix.de --===============0164653753== Content-Type: multipart/alternative; boundary=94eb2c0736e4bf9956051a6142e6 --94eb2c0736e4bf9956051a6142e6 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 --94eb2c0736e4bf9956051a6142e6 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

Signed-off-by: Albert Antony <albert@newtec.dk>
---
=
=C2=A0projectroot/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 insertions= (+)
=C2=A0create mode 100644 projectroot/lib/systemd/system/crond= .service

diff --git a/projectroot/lib/systemd/syst= em/crond.service b/projectroot/lib/systemd/system/crond.service
n= ew file mode 100644
index 0000000..b650ae5
--- /dev/nul= l
+++ b/projectroot/lib/systemd/system/crond.service
@@= -0,0 +1,11 @@
+[Unit]
+Description=3DCron Daemon
=
+After=3Dsyslog.service
+
+[Service]
+Ty= pe=3Dforking
+ExecStart=3D/usr/sbin/crond -b
+Restart= =3Dalways
+
+[Install]
+WantedBy=3Dmulti-user= .target
diff --git a/rules/busybox.= in b/rules/busybox.in
index= 7a41e7c..7bcdc94 100644
--- a/rules/busybox.in
+++ b/rules/busybo= x.in
@@ -90,6 +90,12 @@ config BUSYBOX_TELNETD_SYSTEMD_UNIT
=C2=A0 depends o= n BUSYBOX_TELNETD && SYSTEMD
=C2=A0 prompt "telnetd systemd service files&quo= t;
=C2=A0
+config BUSYBOX_CROND_SYSTEMD_UNIT
= + bool
+ default y
+ depends on BUSYBOX_CROND &&= ; SYSTEMD
+ pro= mpt "crond systemd service files"
+
=C2=A0com= ment "---"
=C2=A0
=C2=A0source "config/b= usybox/Config.in"
diff --git a/rules/busybox.make b/rules/bu= sybox.make
index 60191c2..d2c9990 100644
--- a/rules/bu= sybox.make
+++ b/rules/busybox.make
@@ -224,6 +224,13 @= @ ifdef PTXCONF_BUSYBOX_TELNETD_SYSTEMD_UNIT
=C2=A0 /lib/systemd/system/sockets.target.wa= nts/telnetd.socket)
=C2=A0endif
=C2=A0
+ifdef= PTXCONF_BUSYBOX_CROND_SYSTEMD_UNIT
+ @$(call install_alternative, busybox, 0, 0, 0644, \<= /div>
+ /lib/systemd= /system/crond.service)
+ @$(call install_link, busybox, ../crond.service, \
+ /lib/systemd/system/multi-= user.target.wants/crond.service)
+endif
+
=C2= =A0# #
=C2=A0#<= span class=3D"" style=3D"white-space:pre"> # config files
= =C2=A0# #
--=C2= =A0
2.0.0

--94eb2c0736e4bf9956051a6142e6-- --===============0164653753== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline LS0gCnB0eGRpc3QgbWFpbGluZyBsaXN0CnB0eGRpc3RAcGVuZ3V0cm9uaXguZGUK --===============0164653753==--