diff options
author | Chen Qi <Qi.Chen@windriver.com> | 2014-09-28 15:54:05 +0800 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2014-10-04 00:28:31 +0200 |
commit | 3efc0c1974fd5191d04a8d8d622016e137d24ca0 (patch) | |
tree | 643e60cf3f7d61657d4fb41a20b50c26411fad60 /meta-networking/recipes-daemons | |
parent | fd7973168ab1c8f696cc5e8bcddfeac224cfc775 (diff) | |
download | meta-openembedded-3efc0c1974fd5191d04a8d8d622016e137d24ca0.tar.gz |
vsftpd: add systemd service file
Add systemd service for vsftpd.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-networking/recipes-daemons')
-rw-r--r-- | meta-networking/recipes-daemons/vsftpd/files/vsftpd.service | 9 | ||||
-rw-r--r-- | meta-networking/recipes-daemons/vsftpd/vsftpd_3.0.2.bb | 10 |
2 files changed, 18 insertions, 1 deletions
diff --git a/meta-networking/recipes-daemons/vsftpd/files/vsftpd.service b/meta-networking/recipes-daemons/vsftpd/files/vsftpd.service new file mode 100644 index 000000000..e27102026 --- /dev/null +++ b/meta-networking/recipes-daemons/vsftpd/files/vsftpd.service | |||
@@ -0,0 +1,9 @@ | |||
1 | [Unit] | ||
2 | Description=Vsftpd ftp daemon | ||
3 | After=network.target | ||
4 | |||
5 | [Service] | ||
6 | ExecStart=@SBINDIR@/vsftpd | ||
7 | |||
8 | [Install] | ||
9 | WantedBy=multi-user.target | ||
diff --git a/meta-networking/recipes-daemons/vsftpd/vsftpd_3.0.2.bb b/meta-networking/recipes-daemons/vsftpd/vsftpd_3.0.2.bb index 07c73c5f7..e4d65eea6 100644 --- a/meta-networking/recipes-daemons/vsftpd/vsftpd_3.0.2.bb +++ b/meta-networking/recipes-daemons/vsftpd/vsftpd_3.0.2.bb | |||
@@ -16,6 +16,7 @@ SRC_URI = "https://security.appspot.com/downloads/vsftpd-${PV}.tar.gz \ | |||
16 | file://vsftpd.ftpusers \ | 16 | file://vsftpd.ftpusers \ |
17 | file://change-secure_chroot_dir.patch \ | 17 | file://change-secure_chroot_dir.patch \ |
18 | file://volatiles.99_vsftpd \ | 18 | file://volatiles.99_vsftpd \ |
19 | file://vsftpd.service \ | ||
19 | " | 20 | " |
20 | 21 | ||
21 | LIC_FILES_CHKSUM = "file://COPYING;md5=a6067ad950b28336613aed9dd47b1271 \ | 22 | LIC_FILES_CHKSUM = "file://COPYING;md5=a6067ad950b28336613aed9dd47b1271 \ |
@@ -35,7 +36,7 @@ PAMLIB = "${@base_contains('DISTRO_FEATURES', 'pam', '-L${STAGING_BASELIBDIR} -l | |||
35 | NOPAM_SRC ="${@base_contains('PACKAGECONFIG', 'tcp-wrappers', 'file://nopam-with-tcp_wrappers.patch', 'file://nopam.patch', d)}" | 36 | NOPAM_SRC ="${@base_contains('PACKAGECONFIG', 'tcp-wrappers', 'file://nopam-with-tcp_wrappers.patch', 'file://nopam.patch', d)}" |
36 | SRC_URI += "${@base_contains('DISTRO_FEATURES', 'pam', '', '${NOPAM_SRC}', d)}" | 37 | SRC_URI += "${@base_contains('DISTRO_FEATURES', 'pam', '', '${NOPAM_SRC}', d)}" |
37 | 38 | ||
38 | inherit update-rc.d useradd | 39 | inherit update-rc.d useradd systemd |
39 | 40 | ||
40 | CONFFILES_${PN} = "${sysconfdir}/vsftpd.conf" | 41 | CONFFILES_${PN} = "${sysconfdir}/vsftpd.conf" |
41 | LDFLAGS_append =" -lcrypt -lcap" | 42 | LDFLAGS_append =" -lcrypt -lcap" |
@@ -76,6 +77,11 @@ do_install() { | |||
76 | echo "d /var/run/vsftpd/empty 0755 root root -" \ | 77 | echo "d /var/run/vsftpd/empty 0755 root root -" \ |
77 | > ${D}${sysconfdir}/tmpfiles.d/${BPN}.conf | 78 | > ${D}${sysconfdir}/tmpfiles.d/${BPN}.conf |
78 | fi | 79 | fi |
80 | |||
81 | # Install systemd unit files | ||
82 | install -d ${D}${systemd_unitdir}/system | ||
83 | install -m 0644 ${WORKDIR}/vsftpd.service ${D}${systemd_unitdir}/system | ||
84 | sed -i -e 's#@SBINDIR@#${sbindir}#g' ${D}${systemd_unitdir}/system/vsftpd.service | ||
79 | } | 85 | } |
80 | 86 | ||
81 | INITSCRIPT_PACKAGES = "${PN}" | 87 | INITSCRIPT_PACKAGES = "${PN}" |
@@ -87,6 +93,8 @@ USERADD_PARAM_${PN} = "--system --home-dir /var/lib/ftp --no-create-home -g ftp | |||
87 | --shell /bin/false ftp " | 93 | --shell /bin/false ftp " |
88 | GROUPADD_PARAM_${PN} = "-r ftp" | 94 | GROUPADD_PARAM_${PN} = "-r ftp" |
89 | 95 | ||
96 | SYSTEMD_SERVICE_${PN} = "vsftpd.service" | ||
97 | |||
90 | pkg_postinst_${PN}() { | 98 | pkg_postinst_${PN}() { |
91 | if [ -z "$D" ]; then | 99 | if [ -z "$D" ]; then |
92 | if type systemd-tmpfiles >/dev/null; then | 100 | if type systemd-tmpfiles >/dev/null; then |