summaryrefslogtreecommitdiffstats
path: root/recipes-security/selinux/selinux-config_0.1.bb
diff options
context:
space:
mode:
authorXin Ouyang <Xin.Ouyang@windriver.com>2012-09-19 16:31:24 +0800
committerXin Ouyang <Xin.Ouyang@windriver.com>2012-10-18 11:07:45 +0800
commit3b2088b2bd2d7667c6a47c07dba32ec7ddc5a3ae (patch)
treeba0ccddd8b662bceeda021892f2b6fca8ea94684 /recipes-security/selinux/selinux-config_0.1.bb
parentad05ee24950baaf4c97aba374662065361d15908 (diff)
downloadmeta-selinux-3b2088b2bd2d7667c6a47c07dba32ec7ddc5a3ae.tar.gz
selinux-config: add init script
This script will be installed as 0selinux-init, in runlevel S and sequence number 0. It will start before any other init script. * relabel /dev for restorecon/fixfiles running * rebuild policy and relabel the rootfs if /.autorelabel placed. * relabel the rootfs if it is first booting. Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
Diffstat (limited to 'recipes-security/selinux/selinux-config_0.1.bb')
-rw-r--r--recipes-security/selinux/selinux-config_0.1.bb16
1 files changed, 14 insertions, 2 deletions
diff --git a/recipes-security/selinux/selinux-config_0.1.bb b/recipes-security/selinux/selinux-config_0.1.bb
index c0ed158..48b9362 100644
--- a/recipes-security/selinux/selinux-config_0.1.bb
+++ b/recipes-security/selinux/selinux-config_0.1.bb
@@ -8,13 +8,25 @@ This is the configuration files for SELinux on WRLinux system. \
8SECTION = "base" 8SECTION = "base"
9LICENSE = "MIT" 9LICENSE = "MIT"
10LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" 10LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
11PR = "r0" 11PR = "r1"
12 12
13CONFFILES_${PN} += "${sysconfdir}/selinux/config" 13SRC_URI = "file://selinux-init.sh"
14
15inherit update-rc.d
16
17INITSCRIPT_NAME = "0selinux-init"
18INITSCRIPT_PARAMS = "start 00 S ."
19
20CONFFILES_${PN} += "${sysconfdir}/selinux/config \
21 ${sysconfdir}/init.d/0selinux-init \
22 "
14 23
15PACKAGE_ARCH = "${MACHINE_ARCH}" 24PACKAGE_ARCH = "${MACHINE_ARCH}"
16 25
17do_install () { 26do_install () {
27 install -d ${D}${sysconfdir}/init.d/
28 install -m 0755 ${WORKDIR}/selinux-init.sh ${D}${sysconfdir}/init.d/0selinux-init
29
18 echo "\ 30 echo "\
19# This file controls the state of SELinux on the system. 31# This file controls the state of SELinux on the system.
20# SELINUX= can take one of these three values: 32# SELINUX= can take one of these three values: