diff options
author | Kai Kang <kai.kang@windriver.com> | 2015-07-08 14:26:00 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-07-08 15:22:26 +0100 |
commit | a4b53872a8a9a2743299acbff015f7f2750a69d6 (patch) | |
tree | a85f58cd9c0b64be739b27ee209da71f2caa5bb1 /meta/recipes-core/initscripts | |
parent | d39e35a206c33f6062ebbaed4754a0559b28d766 (diff) | |
download | openembedded-core-a4b53872a8a9a2743299acbff015f7f2750a69d6.tar.gz openembedded-core-a4b53872a8a9a2743299acbff015f7f2750a69d6.tar.bz2 openembedded-core-a4b53872a8a9a2743299acbff015f7f2750a69d6.zip |
initscripts: add /sbin/sushell for systemd service debug-shell
Add file /sbin/sushell for systemd service debug-shell which starts with
/bin/sushell when SELinux is enabled. Copy and add sushell file from
Fedora 22.
Add runtime dependency bash as well when systemd is enabled to eliminate
QA warning:
WARNING: QA Issue: /sbin/sushell_initscripts contained in package initscripts
requires /bin/bash, but no providers found in its RDEPENDS [file-rdeps]
Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/initscripts')
-rw-r--r-- | meta/recipes-core/initscripts/initscripts-1.0/sushell | 5 | ||||
-rw-r--r-- | meta/recipes-core/initscripts/initscripts_1.0.bb | 10 |
2 files changed, 14 insertions, 1 deletions
diff --git a/meta/recipes-core/initscripts/initscripts-1.0/sushell b/meta/recipes-core/initscripts/initscripts-1.0/sushell new file mode 100644 index 0000000000..7d96941687 --- /dev/null +++ b/meta/recipes-core/initscripts/initscripts-1.0/sushell @@ -0,0 +1,5 @@ +#!/bin/bash + +[ -z "$SUSHELL" ] && SUSHELL=/bin/bash + +exec $SUSHELL diff --git a/meta/recipes-core/initscripts/initscripts_1.0.bb b/meta/recipes-core/initscripts/initscripts_1.0.bb index a086591b80..b1d917da6a 100644 --- a/meta/recipes-core/initscripts/initscripts_1.0.bb +++ b/meta/recipes-core/initscripts/initscripts_1.0.bb @@ -33,6 +33,7 @@ SRC_URI = "file://functions \ file://GPLv2.patch \ file://dmesg.sh \ file://logrotate-dmesg.conf \ + ${@bb.utils.contains('DISTRO_FEATURES','selinux','file://sushell','',d)} \ " S = "${WORKDIR}" @@ -46,7 +47,9 @@ DEPENDS_append = " update-rc.d-native" DEPENDS_append = " ${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd-systemctl-native','',d)}" PACKAGES =+ "${PN}-functions" -RDEPENDS_${PN} = "${PN}-functions" +RDEPENDS_${PN} = "${PN}-functions \ + ${@bb.utils.contains('DISTRO_FEATURES','selinux','bash','',d)} \ + " FILES_${PN}-functions = "${sysconfdir}/init.d/functions*" ALTERNATIVE_PRIORITY_${PN}-functions = "90" @@ -104,6 +107,11 @@ do_install () { if [ "${TARGET_ARCH}" = "arm" ]; then install -m 0755 ${WORKDIR}/alignment.sh ${D}${sysconfdir}/init.d fi + + if ${@bb.utils.contains('DISTRO_FEATURES','selinux','true','false',d)}; then + install -d ${D}/${base_sbindir} + install -m 0755 ${WORKDIR}/sushell ${D}/${base_sbindir} + fi # # Install device dependent scripts # |