98selinux/selinux-loadpolicy.sh: use mount --rbind for /dev

This preserves /dev/shm and /dev/pts for the selinux relabel.
master
Will Woods 2012-03-20 13:31:36 +01:00 committed by Harald Hoyer
parent abbb76fe93
commit 5055abb615
1 changed files with 1 additions and 1 deletions

View File

@ -43,7 +43,7 @@ rd_load_policy()
if [ $ret -eq 0 -o $ret -eq 2 ]; then if [ $ret -eq 0 -o $ret -eq 2 ]; then
# If machine requires a relabel, force to permissive mode # If machine requires a relabel, force to permissive mode
[ -e "$NEWROOT"/.autorelabel ] && LANG=C /usr/sbin/setenforce 0 [ -e "$NEWROOT"/.autorelabel ] && LANG=C /usr/sbin/setenforce 0
mount --bind /dev "$NEWROOT/dev" mount --rbind /dev "$NEWROOT/dev"
LANG=C chroot "$NEWROOT" /sbin/restorecon -R /dev LANG=C chroot "$NEWROOT" /sbin/restorecon -R /dev
return 0 return 0
fi fi