diff options
author | Xin Ouyang <Xin.Ouyang@windriver.com> | 2012-09-19 16:31:24 +0800 |
---|---|---|
committer | Xin Ouyang <Xin.Ouyang@windriver.com> | 2012-10-18 11:07:45 +0800 |
commit | 3b2088b2bd2d7667c6a47c07dba32ec7ddc5a3ae (patch) | |
tree | ba0ccddd8b662bceeda021892f2b6fca8ea94684 /recipes-security/selinux/selinux-config_0.1.bb | |
parent | ad05ee24950baaf4c97aba374662065361d15908 (diff) | |
download | meta-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.bb | 16 |
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. \ | |||
8 | SECTION = "base" | 8 | SECTION = "base" |
9 | LICENSE = "MIT" | 9 | LICENSE = "MIT" |
10 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" | 10 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" |
11 | PR = "r0" | 11 | PR = "r1" |
12 | 12 | ||
13 | CONFFILES_${PN} += "${sysconfdir}/selinux/config" | 13 | SRC_URI = "file://selinux-init.sh" |
14 | |||
15 | inherit update-rc.d | ||
16 | |||
17 | INITSCRIPT_NAME = "0selinux-init" | ||
18 | INITSCRIPT_PARAMS = "start 00 S ." | ||
19 | |||
20 | CONFFILES_${PN} += "${sysconfdir}/selinux/config \ | ||
21 | ${sysconfdir}/init.d/0selinux-init \ | ||
22 | " | ||
14 | 23 | ||
15 | PACKAGE_ARCH = "${MACHINE_ARCH}" | 24 | PACKAGE_ARCH = "${MACHINE_ARCH}" |
16 | 25 | ||
17 | do_install () { | 26 | do_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: |