[yocto] [meta-selinux][PATCH 1/5] selinux-initsh.inc: add systemd support

Shrikant Bobade bobadeshrikant at gmail.com
Mon Aug 29 04:21:41 PDT 2016


Hi,


@Ping,


Thanks
Shrikant

On Mon, Aug 22, 2016 at 6:36 PM, Shrikant Bobade <bobadeshrikant at gmail.com>
wrote:

> From: Shrikant Bobade <shrikant_bobade at mentor.com>
>
> add support for systemd service file and handling of script required by
> systemd service file.
>
> Signed-off-by: Shrikant Bobade <shrikant_bobade at mentor.com>
> ---
>  recipes-security/selinux/selinux-initsh.inc | 12 +++++++++++-
>  1 file changed, 11 insertions(+), 1 deletion(-)
>
> diff --git a/recipes-security/selinux/selinux-initsh.inc
> b/recipes-security/selinux/selinux-initsh.inc
> index f7348bb..bcdd449 100644
> --- a/recipes-security/selinux/selinux-initsh.inc
> +++ b/recipes-security/selinux/selinux-initsh.inc
> @@ -13,11 +13,21 @@ CONFFILES_${PN} += "${sysconfdir}/init.d/${
> SELINUX_SCRIPT_DST}"
>
>  PACKAGE_ARCH ?= "${MACHINE_ARCH}"
>
> -inherit update-rc.d
> +inherit update-rc.d systemd
> +
> +SYSTEMD_SERVICE_${PN} = "${SELINUX_SCRIPT_SRC}.service"
>
>  do_install () {
>         install -d ${D}${sysconfdir}/init.d/
>         install -m 0755 ${WORKDIR}/${SELINUX_SCRIPT_SRC}.sh
> ${D}${sysconfdir}/init.d/${SELINUX_SCRIPT_DST}
> +
> +       install -d ${D}${systemd_unitdir}/system
> +       install -m 0644 ${WORKDIR}/${SELINUX_SCRIPT_SRC}.service
> ${D}${systemd_unitdir}/system
> +
> +       if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true',
> 'false', d)}; then
> +               install -d ${D}${bindir}
> +               install -m 0755 ${WORKDIR}/${SELINUX_SCRIPT_SRC}.sh
> ${D}${bindir}
> +       fi
>  }
>
>  sysroot_stage_all_append () {
> --
> 1.9.1
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20160829/c016e22c/attachment.html>


More information about the yocto mailing list