From: Chen Qi Date: Sun, 28 Sep 2014 07:54:05 +0000 (+0800) Subject: vsftpd: add systemd service file X-Git-Tag: rev_ivi_2015_02_04~1357 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=893884a17864010d0ca3d893be6da76e88ed42d8;p=scm%2Fbb%2Ftizen-distro.git vsftpd: add systemd service file Add systemd service for vsftpd. (From meta-openembedded rev: 3efc0c1974fd5191d04a8d8d622016e137d24ca0) Signed-off-by: Chen Qi Signed-off-by: Martin Jansa Signed-off-by: Patrick Ohly --- diff --git a/meta-openembedded/meta-networking/recipes-daemons/vsftpd/files/vsftpd.service b/meta-openembedded/meta-networking/recipes-daemons/vsftpd/files/vsftpd.service new file mode 100644 index 0000000..e271020 --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-daemons/vsftpd/files/vsftpd.service @@ -0,0 +1,9 @@ +[Unit] +Description=Vsftpd ftp daemon +After=network.target + +[Service] +ExecStart=@SBINDIR@/vsftpd + +[Install] +WantedBy=multi-user.target diff --git a/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd_3.0.2.bb b/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd_3.0.2.bb index 07c73c5..e4d65ee 100644 --- a/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd_3.0.2.bb +++ b/meta-openembedded/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 \ file://vsftpd.ftpusers \ file://change-secure_chroot_dir.patch \ file://volatiles.99_vsftpd \ + file://vsftpd.service \ " LIC_FILES_CHKSUM = "file://COPYING;md5=a6067ad950b28336613aed9dd47b1271 \ @@ -35,7 +36,7 @@ PAMLIB = "${@base_contains('DISTRO_FEATURES', 'pam', '-L${STAGING_BASELIBDIR} -l NOPAM_SRC ="${@base_contains('PACKAGECONFIG', 'tcp-wrappers', 'file://nopam-with-tcp_wrappers.patch', 'file://nopam.patch', d)}" SRC_URI += "${@base_contains('DISTRO_FEATURES', 'pam', '', '${NOPAM_SRC}', d)}" -inherit update-rc.d useradd +inherit update-rc.d useradd systemd CONFFILES_${PN} = "${sysconfdir}/vsftpd.conf" LDFLAGS_append =" -lcrypt -lcap" @@ -76,6 +77,11 @@ do_install() { echo "d /var/run/vsftpd/empty 0755 root root -" \ > ${D}${sysconfdir}/tmpfiles.d/${BPN}.conf fi + + # Install systemd unit files + install -d ${D}${systemd_unitdir}/system + install -m 0644 ${WORKDIR}/vsftpd.service ${D}${systemd_unitdir}/system + sed -i -e 's#@SBINDIR@#${sbindir}#g' ${D}${systemd_unitdir}/system/vsftpd.service } INITSCRIPT_PACKAGES = "${PN}" @@ -87,6 +93,8 @@ USERADD_PARAM_${PN} = "--system --home-dir /var/lib/ftp --no-create-home -g ftp --shell /bin/false ftp " GROUPADD_PARAM_${PN} = "-r ftp" +SYSTEMD_SERVICE_${PN} = "vsftpd.service" + pkg_postinst_${PN}() { if [ -z "$D" ]; then if type systemd-tmpfiles >/dev/null; then