3 # Fedora solution to set the ownership/permissions of s device to the local
4 # logged in user. Uses the program pam_console_setowner to match the names of
5 # the device node and the symlinks against a device list and applies the
6 # configured ownership and permission to the node.
8 [ "$ACTION" != "add" ] && exit 0
10 # we do not have console users in rc.sysinit
11 [ -n "$IN_INITLOG" ] && exit 0
13 if [ -x /sbin/pam_console_setowner -a -f /var/run/console/console.lock \
14 -a -e "$DEVNAME" ]; then
16 if [ -x /usr/bin/logger ]; then
17 LOGGER=/usr/bin/logger
18 elif [ -x /bin/logger ]; then
26 if [ -t 1 -o -z "$LOGGER" ]; then
32 $LOGGER -t $(basename $0)"[$$]" "$@"
37 test "$udev_log" = "" -o "$udev_log" = "no" && return
41 if [ -f /etc/udev/udev.conf ]; then
46 for i in $(/usr/bin/udevinfo -q symlink -p "$DEVPATH"); do
48 SYMLINKS="$SYMLINKS ${udev_root%%/}/$i"
50 debug_mesg "Restoring console permissions for $DEVNAME $SYMLINKS"
51 /sbin/pam_console_setowner "$DEVNAME" $SYMLINKS