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

if [ -f /etc/sysconfig/udev ]; then
	. /etc/sysconfig/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