aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJackie Huang <jackie.huang@windriver.com>2014-05-09 05:50:18 -0400
committerJoe MacDonald <joe@deserted.net>2014-05-09 08:59:54 -0400
commit368f65a475069ed384d82be09c2515fb765e22ec (patch)
tree6eae0113294311e92c0cf2331a3e7e04d792e0b7
parentb14b21c0c5de0f206cc66bf90decc70ac156e650 (diff)
downloadmeta-selinux-368f65a475069ed384d82be09c2515fb765e22ec.tar.gz
meta-selinux-368f65a475069ed384d82be09c2515fb765e22ec.tar.bz2
meta-selinux-368f65a475069ed384d82be09c2515fb765e22ec.zip
initscripts/checkroot.sh: restore file contexts for /run
The file contexts for /run is incorrect while running checkroot.sh in boot time which causes mount fail to create new dir and file in /run, so restore the security contexts in it. Signed-off-by: Jackie Huang <jackie.huang@windriver.com> Signed-off-by: Joe MacDonald <joe@deserted.net>
-rw-r--r--recipes-core/initscripts/initscripts_1.0.bbappend2
1 files changed, 2 insertions, 0 deletions
diff --git a/recipes-core/initscripts/initscripts_1.0.bbappend b/recipes-core/initscripts/initscripts_1.0.bbappend
index 7ec66ea..367cd6b 100644
--- a/recipes-core/initscripts/initscripts_1.0.bbappend
+++ b/recipes-core/initscripts/initscripts_1.0.bbappend
@@ -5,4 +5,6 @@ do_install_append () {
touch /var/log/lastlog
test ! -x /sbin/restorecon || /sbin/restorecon -RF /var/volatile/ /var/lib /run
EOF
+ sed -i '/mount -n -o remount,$rootmode/i\test ! -x /sbin/restorecon || /sbin/restorecon -RF /run' \
+ ${D}${sysconfdir}/init.d/checkroot.sh
}