* [meta-networking][PATCH] proftpd: add systemd support
@ 2015-02-09 2:39 rongqing.li
2015-02-12 3:23 ` Joe MacDonald
0 siblings, 1 reply; 2+ messages in thread
From: rongqing.li @ 2015-02-09 2:39 UTC (permalink / raw)
To: openembedded-devel
From: Roy Li <rongqing.li@windriver.com>
Signed-off-by: Roy Li <rongqing.li@windriver.com>
---
.../recipes-daemons/proftpd/files/proftpd.service | 7 +++++++
meta-networking/recipes-daemons/proftpd/proftpd_1.3.5.bb | 15 +++++++++++++--
2 files changed, 20 insertions(+), 2 deletions(-)
create mode 100644 meta-networking/recipes-daemons/proftpd/files/proftpd.service
diff --git a/meta-networking/recipes-daemons/proftpd/files/proftpd.service b/meta-networking/recipes-daemons/proftpd/files/proftpd.service
new file mode 100644
index 0000000..ba97f8e
--- /dev/null
+++ b/meta-networking/recipes-daemons/proftpd/files/proftpd.service
@@ -0,0 +1,7 @@
+[Unit]
+Description=proftpd Daemon
+
+[Service]
+Type=forking
+ExecStart=-@SBINDIR@/proftpd -c @SYSCONFDIR@/proftpd.conf
+StandardError=syslog
diff --git a/meta-networking/recipes-daemons/proftpd/proftpd_1.3.5.bb b/meta-networking/recipes-daemons/proftpd/proftpd_1.3.5.bb
index cba39e8..ca629be 100644
--- a/meta-networking/recipes-daemons/proftpd/proftpd_1.3.5.bb
+++ b/meta-networking/recipes-daemons/proftpd/proftpd_1.3.5.bb
@@ -11,12 +11,13 @@ SRC_URI = "ftp://ftp.proftpd.org/distrib/source/${BPN}-${PV}.tar.gz \
file://close-RequireValidShell-check.patch \
file://contrib.patch \
file://build_fixup.patch \
- "
+ file://proftpd.service \
+ "
SRC_URI[md5sum] = "aff1bff40e675244d72c4667f203e5bb"
SRC_URI[sha256sum] = "c10316fb003bd25eccbc08c77dd9057e053693e6527ffa2ea2cc4e08ccb87715"
-inherit autotools-brokensep useradd update-rc.d
+inherit autotools-brokensep useradd update-rc.d systemd
PACKAGECONFIG ??= "sia shadow"
PACKAGECONFIG += " ${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6', '', d)}"
@@ -87,11 +88,21 @@ do_install () {
# create the pub directory
mkdir -p ${D}/home/${FTPUSER}/pub/
chown -R ${FTPUSER}:${FTPGROUP} ${D}/home/${FTPUSER}/pub
+
+ install -d ${D}/${systemd_unitdir}/system
+ install -m 644 ${WORKDIR}/proftpd.service ${D}/${systemd_unitdir}/system
+ sed -e 's,@BASE_SBINDIR@,${base_sbindir},g' \
+ -e 's,@SYSCONFDIR@,${sysconfdir},g' \
+ -e 's,@SBINDIR@,${sbindir},g' \
+ -i ${D}${systemd_unitdir}/system/*.service
}
INITSCRIPT_NAME = "proftpd"
INITSCRIPT_PARAM = "defaults 85 15"
+SYSTEMD_PACKAGES = "${PN}"
+SYSTEMD_SERVICE_${PN} = "proftpd.service"
+
USERADD_PACKAGES = "${PN}"
GROUPADD_PARAM_${PN} = "--system ${FTPGROUP}"
USERADD_PARAM_${PN} = "--system -g ${FTPGROUP} --home-dir /var/lib/${FTPUSER} --no-create-home \
--
2.1.0
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [meta-networking][PATCH] proftpd: add systemd support
2015-02-09 2:39 [meta-networking][PATCH] proftpd: add systemd support rongqing.li
@ 2015-02-12 3:23 ` Joe MacDonald
0 siblings, 0 replies; 2+ messages in thread
From: Joe MacDonald @ 2015-02-12 3:23 UTC (permalink / raw)
To: openembedded-devel
[-- Attachment #1: Type: text/plain, Size: 3006 bytes --]
Merged, thanks Roy. I corrected the whitespace issue I noticed while I
was there.
-J.
[[oe] [meta-networking][PATCH] proftpd: add systemd support] On 15.02.09 (Mon 10:39) rongqing.li@windriver.com wrote:
> From: Roy Li <rongqing.li@windriver.com>
>
> Signed-off-by: Roy Li <rongqing.li@windriver.com>
> ---
> .../recipes-daemons/proftpd/files/proftpd.service | 7 +++++++
> meta-networking/recipes-daemons/proftpd/proftpd_1.3.5.bb | 15 +++++++++++++--
> 2 files changed, 20 insertions(+), 2 deletions(-)
> create mode 100644 meta-networking/recipes-daemons/proftpd/files/proftpd.service
>
> diff --git a/meta-networking/recipes-daemons/proftpd/files/proftpd.service b/meta-networking/recipes-daemons/proftpd/files/proftpd.service
> new file mode 100644
> index 0000000..ba97f8e
> --- /dev/null
> +++ b/meta-networking/recipes-daemons/proftpd/files/proftpd.service
> @@ -0,0 +1,7 @@
> +[Unit]
> +Description=proftpd Daemon
> +
> +[Service]
> +Type=forking
> +ExecStart=-@SBINDIR@/proftpd -c @SYSCONFDIR@/proftpd.conf
> +StandardError=syslog
> diff --git a/meta-networking/recipes-daemons/proftpd/proftpd_1.3.5.bb b/meta-networking/recipes-daemons/proftpd/proftpd_1.3.5.bb
> index cba39e8..ca629be 100644
> --- a/meta-networking/recipes-daemons/proftpd/proftpd_1.3.5.bb
> +++ b/meta-networking/recipes-daemons/proftpd/proftpd_1.3.5.bb
> @@ -11,12 +11,13 @@ SRC_URI = "ftp://ftp.proftpd.org/distrib/source/${BPN}-${PV}.tar.gz \
> file://close-RequireValidShell-check.patch \
> file://contrib.patch \
> file://build_fixup.patch \
> - "
> + file://proftpd.service \
> + "
>
> SRC_URI[md5sum] = "aff1bff40e675244d72c4667f203e5bb"
> SRC_URI[sha256sum] = "c10316fb003bd25eccbc08c77dd9057e053693e6527ffa2ea2cc4e08ccb87715"
>
> -inherit autotools-brokensep useradd update-rc.d
> +inherit autotools-brokensep useradd update-rc.d systemd
>
> PACKAGECONFIG ??= "sia shadow"
> PACKAGECONFIG += " ${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6', '', d)}"
> @@ -87,11 +88,21 @@ do_install () {
> # create the pub directory
> mkdir -p ${D}/home/${FTPUSER}/pub/
> chown -R ${FTPUSER}:${FTPGROUP} ${D}/home/${FTPUSER}/pub
> +
> + install -d ${D}/${systemd_unitdir}/system
> + install -m 644 ${WORKDIR}/proftpd.service ${D}/${systemd_unitdir}/system
> + sed -e 's,@BASE_SBINDIR@,${base_sbindir},g' \
> + -e 's,@SYSCONFDIR@,${sysconfdir},g' \
> + -e 's,@SBINDIR@,${sbindir},g' \
> + -i ${D}${systemd_unitdir}/system/*.service
> }
>
> INITSCRIPT_NAME = "proftpd"
> INITSCRIPT_PARAM = "defaults 85 15"
>
> +SYSTEMD_PACKAGES = "${PN}"
> +SYSTEMD_SERVICE_${PN} = "proftpd.service"
> +
> USERADD_PACKAGES = "${PN}"
> GROUPADD_PARAM_${PN} = "--system ${FTPGROUP}"
> USERADD_PARAM_${PN} = "--system -g ${FTPGROUP} --home-dir /var/lib/${FTPUSER} --no-create-home \
> --
> 2.1.0
>
--
-Joe MacDonald.
:wq
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 501 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-02-12 3:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-09 2:39 [meta-networking][PATCH] proftpd: add systemd support rongqing.li
2015-02-12 3:23 ` Joe MacDonald
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.