summaryrefslogtreecommitdiff
path: root/sys-fs/devfsd/files/devfsd.conf
blob: 109ac87877c9849604310823f483b7b686b10838 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
# Sample /etc/devfsd.conf configuration file.
# Richard Gooch  <rgooch@atnf.csiro.au>		17-FEB-2002
#
# The Gentoo Linux Team - http://www.gentoo.org/
#     - Many fixes, etc
#
# $Id$

# Enable full compatibility mode for old device names. You may comment these
# out if you don't use the old device names. Make sure you know what you're
# doing!
REGISTER        .*           MKOLDCOMPAT
UNREGISTER      .*           RMOLDCOMPAT

# You may comment out the above and uncomment the following if you've
# configured your system to use the original "new" devfs names or the really
# new names
#REGISTER       ^vc/.*       MKOLDCOMPAT
#UNREGISTER     ^vc/.*       RMOLDCOMPAT
#REGISTER       ^pty/.*      MKOLDCOMPAT
#UNREGISTER     ^pty/.*      RMOLDCOMPAT
#REGISTER       ^misc        MKOLDCOMPAT
#UNREGISTER     ^misc        RMOLDCOMPAT

# You may comment these out if you don't use the original "new" names
REGISTER        .*           MKNEWCOMPAT
UNREGISTER      .*           RMNEWCOMPAT

# Enable module autoloading. You may comment this out if you don't use
# autoloading
LOOKUP          .*           MODLOAD

# Uncomment the following if you want to set the group to "tty" for the
# pseudo-tty devices. This is necessary so that mesg(1) can later be used to
# enable/disable talk requests and wall(1) messages.
REGISTER        ^pty/s.*     PERMISSIONS -1.tty  0600
REGISTER        ^pts/.*      PERMISSIONS -1.tty  0600

# Uncomment this if you want permissions to be saved and restored
# NB: Do NOT change the following!
# Do not do this for pseudo-terminal devices
REGISTER        ^pt[sy]/.*   IGNORE
CHANGE          ^pt[sy]/.*   IGNORE
CREATE          ^pt[sy]/.*   IGNORE
DELETE          ^pt[sy]      IGNORE
REGISTER        ^log         IGNORE
CHANGE          ^log         IGNORE
CREATE          ^log         IGNORE
DELETE          ^log         IGNORE
REGISTER        .*           COPY    /lib/dev-state/$devname $devpath
CHANGE          .*           COPY    $devpath /lib/dev-state/$devname
CREATE          .*           COPY    $devpath /lib/dev-state/$devname
DELETE          .*           CFUNCTION GLOBAL unlink /lib/dev-state/$devname
RESTORE         /lib/dev-state

# You can force default like this :
# PERMISSIONS owner_and_group access_mode

# ALSA/OSS stuff
# Comment/change these if you want to change the permissions on
# the audio devices
LOOKUP          snd          MODLOAD ACTION snd
LOOKUP          dsp          MODLOAD
LOOKUP          mixer        MODLOAD
LOOKUP          midi         MODLOAD
REGISTER        sound/.*     PERMISSIONS root.audio 660
REGISTER        snd/.*       PERMISSIONS root.audio 660

# Uncomment this to let PAM manage devfs
#REGISTER        .*           CFUNCTION /lib/security/pam_console_apply_devfsd.so pam_console_apply_single $devpath

# Autoload the sg module if generic scsi driver compiled as module.
#LOOKUP          ^sg$      MODLOAD ACTION sg

# Give the cdrom group access to /dev/sg0
REGISTER        ^scsi/host.*/bus.*/target.*/lun.*/generic    PERMISSIONS root.cdrom 660

# Give the cdrom group access to the cdrom devices
REGISTER        ^scsi/host.*/bus.*/target.*/lun.*/cd    PERMISSIONS root.cdrom 660
REGISTER        ^ide/host.*/bus.*/target.*/lun.*/cd    PERMISSIONS root.cdrom 660

# Give the floppy group access to the floppy devices
REGISTER        ^floppy/.*    PERMISSIONS root.floppy 660

# Give the usb group access to the usb devices
REGISTER        ^usb/.*    PERMISSIONS root.usb 660
REGISTER        ^tts/USB.*    PERMISSIONS root.usb 660
REGISTER        ^usb/tts/(.*)$  CFUNCTION GLOBAL mksymlink $devname ttyUSB\1
UNREGISTER      ^usb/tts/(.*)$  CFUNCTION GLOBAL unlink ttyUSB\1 

# Video devices
REGISTER        ^v4l/.*    PERMISSIONS root.video 660
REGISTER        ^dri/.*    PERMISSIONS root.video 660
REGISTER        ^nvidia.*    PERMISSIONS root.video 660

# General note for the following auto creation of symlinks:
#
#    If you change the device that the symlink points to,
#    you should also remove the symlink before restarting
#    devfsd

# Create /dev/cdrom for the first cdrom drive
LOOKUP          ^cdrom$          CFUNCTION GLOBAL mksymlink cdroms/cdrom0 cdrom
REGISTER        ^cdroms/cdrom0$   CFUNCTION GLOBAL mksymlink $devname cdrom
UNREGISTER      ^cdroms/cdrom0$   CFUNCTION GLOBAL unlink cdrom

# Create /dev/dvd for the second cdrom drive
# (change 'cdroms/cdrom1' to suite your setup)
# NOTE: We add the fully qualified path here, else some apps
#       have problems to resolve the true device (drip comes to mind)
#LOOKUP          ^dvd$           CFUNCTION GLOBAL mksymlink ${mntpnt}/cdroms/cdrom1 dvd
#REGISTER        ^cdroms/cdrom1$  CFUNCTION GLOBAL mksymlink ${devpath} dvd
#UNREGISTER      ^cdroms/cdrom1$  CFUNCTION GLOBAL unlink dvd

# Create /dev/cdrw for the first cdrom on the scsi bus
# (change 'sr0' to suite your setup)
#LOOKUP          ^cdrw$          CFUNCTION GLOBAL mksymlink sr0 cdrw
#REGISTER        ^sr0$           CFUNCTION GLOBAL mksymlink $devname cdrw
#UNREGISTER      ^sr0$           CFUNCTION GLOBAL unlink cdrw

# Create /dev/mouse
LOOKUP          ^mouse$          CFUNCTION GLOBAL mksymlink misc/psaux mouse
REGISTER        ^misc/psaux$     CFUNCTION GLOBAL mksymlink $devname mouse
UNREGISTER      ^misc/psaux$     CFUNCTION GLOBAL unlink mouse

# Manage USB mouse
REGISTER        ^input/mouse0$   CFUNCTION GLOBAL mksymlink $devname usbmouse
UNREGISTER      ^input/mouse0$   CFUNCTION GLOBAL unlink usbmouse
REGISTER        ^input/mice$     CFUNCTION GLOBAL mksymlink $devname usbmouse
UNREGISTER      ^input/mice$     CFUNCTION GLOBAL unlink usbmouse

# Create compatibility link for broken misc/net/tun driver
REGISTER        ^misc/net/tun$   CFUNCTION GLOBAL unlink net/tun
REGISTER        ^misc/net/tun$   CFUNCTION GLOBAL symlink /dev/$devname net/tun

# Support additional config installed by packages ...
INCLUDE /etc/devfs.d

# devfsd.conf ends here