devfs: fix SELinux contexts

SELinux contexts in /dev need to be fixed after it is mounted

X-Gentoo-Bug: 516956
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=516956
This commit is contained in:
Jason Zaman 2014-07-15 22:27:33 +04:00 committed by William Hubbs
parent 4f784bd469
commit 525d7140b1

View File

@ -92,9 +92,21 @@ seed_dev()
done
}
restorecon_dev()
{
if [ -x /sbin/restorecon ]; then
ebegin "Set SELinux labels in /dev"
restorecon -rF /dev >/dev/null 2>&1
eend $?
fi
return 0
}
start()
{
mount_dev
seed_dev
restorecon_dev
return 0
}