aboutsummaryrefslogtreecommitdiff
path: root/init.d/devfs.in
diff options
context:
space:
mode:
authorJason Zaman <jason@perfinion.com>2014-07-15 22:27:33 +0400
committerWilliam Hubbs <w.d.hubbs@gmail.com>2014-07-16 11:58:11 -0500
commit525d7140b12a8e259f9d919f24148e369e9ff7d1 (patch)
tree9be315a2b4896e3d5512ae7437308d43fe4cc9f2 /init.d/devfs.in
parent4f784bd46923486773edcd7749246a21bd419e6b (diff)
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
Diffstat (limited to 'init.d/devfs.in')
-rw-r--r--init.d/devfs.in12
1 files changed, 12 insertions, 0 deletions
diff --git a/init.d/devfs.in b/init.d/devfs.in
index ae5f03bf..196bc57d 100644
--- a/init.d/devfs.in
+++ b/init.d/devfs.in
@@ -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
}