summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZhixiong Chi <zhixiong.chi@windriver.com>2017-06-22 10:17:23 +0800
committerMark Hatle <mark.hatle@windriver.com>2017-09-08 13:19:24 -0500
commit827b305e0489c522e892921e90899d2a933eeec6 (patch)
treee4b794ce7a41a2743d0cf26d30f3d1dcc958cb82
parent24cce7bd23121e67d9c9a1660d6f522d456a8049 (diff)
downloadmeta-selinux-827b305e0489c522e892921e90899d2a933eeec6.tar.gz
initscripts: use the 'i' option for restorecon command
Use the 'i' option for restorecon command to ignore the files that don't exist when building project. Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com>
-rw-r--r--recipes-core/initscripts/initscripts_1.0.bbappend4
1 files changed, 2 insertions, 2 deletions
diff --git a/recipes-core/initscripts/initscripts_1.0.bbappend b/recipes-core/initscripts/initscripts_1.0.bbappend
index f17cf07..0fc7a5e 100644
--- a/recipes-core/initscripts/initscripts_1.0.bbappend
+++ b/recipes-core/initscripts/initscripts_1.0.bbappend
@@ -5,9 +5,9 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
5do_install_append () { 5do_install_append () {
6 cat <<-EOF >> ${D}${sysconfdir}/init.d/populate-volatile.sh 6 cat <<-EOF >> ${D}${sysconfdir}/init.d/populate-volatile.sh
7touch /var/log/lastlog 7touch /var/log/lastlog
8test ! -x /sbin/restorecon || /sbin/restorecon -RF /var/volatile/ /var/lib /run \ 8test ! -x /sbin/restorecon || /sbin/restorecon -iRF /var/volatile/ /var/lib /run \
9 /etc/resolv.conf /etc/adjtime 9 /etc/resolv.conf /etc/adjtime
10EOF 10EOF
11 sed -i '/mount -n -o remount,$rootmode/i\test ! -x /sbin/restorecon || /sbin/restorecon -RF /run' \ 11 sed -i '/mount -n -o remount,$rootmode/i\test ! -x /sbin/restorecon || /sbin/restorecon -iRF /run' \
12 ${D}${sysconfdir}/init.d/checkroot.sh 12 ${D}${sysconfdir}/init.d/checkroot.sh
13} 13}