diff options
author | Shrikant Bobade <shrikant_bobade@mentor.com> | 2016-08-22 18:36:20 +0530 |
---|---|---|
committer | Joe MacDonald <joe_macdonald@mentor.com> | 2016-09-01 14:30:46 -0400 |
commit | 52337bbcfd432caeb734d5561bf0634c2ef08dc0 (patch) | |
tree | d01f88bcb78364e5b347ea487f7793445c463d23 | |
parent | 0ef21d071fb72d9cfaef5a9aac8a1f61a9c4a1fa (diff) | |
download | meta-selinux-52337bbcfd432caeb734d5561bf0634c2ef08dc0.tar.gz |
selinux-initsh.inc: add systemd support
add support for systemd service file and handling of script required by
systemd service file.
Signed-off-by: Shrikant Bobade <shrikant_bobade@mentor.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
-rw-r--r-- | recipes-security/selinux/selinux-initsh.inc | 12 |
1 files changed, 11 insertions, 1 deletions
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}" | |||
13 | 13 | ||
14 | PACKAGE_ARCH ?= "${MACHINE_ARCH}" | 14 | PACKAGE_ARCH ?= "${MACHINE_ARCH}" |
15 | 15 | ||
16 | inherit update-rc.d | 16 | inherit update-rc.d systemd |
17 | |||
18 | SYSTEMD_SERVICE_${PN} = "${SELINUX_SCRIPT_SRC}.service" | ||
17 | 19 | ||
18 | do_install () { | 20 | do_install () { |
19 | install -d ${D}${sysconfdir}/init.d/ | 21 | install -d ${D}${sysconfdir}/init.d/ |
20 | install -m 0755 ${WORKDIR}/${SELINUX_SCRIPT_SRC}.sh ${D}${sysconfdir}/init.d/${SELINUX_SCRIPT_DST} | 22 | install -m 0755 ${WORKDIR}/${SELINUX_SCRIPT_SRC}.sh ${D}${sysconfdir}/init.d/${SELINUX_SCRIPT_DST} |
23 | |||
24 | install -d ${D}${systemd_unitdir}/system | ||
25 | install -m 0644 ${WORKDIR}/${SELINUX_SCRIPT_SRC}.service ${D}${systemd_unitdir}/system | ||
26 | |||
27 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then | ||
28 | install -d ${D}${bindir} | ||
29 | install -m 0755 ${WORKDIR}/${SELINUX_SCRIPT_SRC}.sh ${D}${bindir} | ||
30 | fi | ||
21 | } | 31 | } |
22 | 32 | ||
23 | sysroot_stage_all_append () { | 33 | sysroot_stage_all_append () { |