summaryrefslogtreecommitdiff
path: root/etc/dev.d/default/selinux.dev
blob: 7911d345b998676492da69ed13e48e9f6d3b76f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh

if [ -f /etc/sysconfig/udev ]; then
	. /etc/sysconfig/udev
fi

if [ -f /etc/conf.d/udev ]; then
	. /etc/conf.d/udev
fi

[ "$UDEV_SELINUX" != "yes" ] && exit 0

if [ -x /sbin/restorecon ]; then
	if [ "$UDEV_LOG" = "yes" -a -x /usr/bin/logger ]; then
		/usr/bin/logger -p auth.debug "Restoring file security contexts for $DEVNAME"
	fi
	/sbin/restorecon $DEVNAME
fi