blob: ea73343749bb885260ab2711658f4e9a98ab7a35 [file] [log] [blame]
Glenn L McGrath12940e12003-10-09 13:25:00 +00001# Sample /etc/devfsd.conf configuration file.
2# Richard Gooch <rgooch@atnf.csiro.au> 17-FEB-2002
3#
4# adapted for busybox devfsd implementation by Tito <farmatito@tiscali.it>
5#
6# Enable full compatibility mode for old device names. You may comment these
7# out if you don't use the old device names. Make sure you know what you're
8# doing!
9REGISTER .* MKOLDCOMPAT
10UNREGISTER .* RMOLDCOMPAT
11
12# You may comment out the above and uncomment the following if you've
13# configured your system to use the original "new" devfs names or the really
14# new names
15#REGISTER ^vc/ MKOLDCOMPAT
16#UNREGISTER ^vc/ RMOLDCOMPAT
17#REGISTER ^pty/ MKOLDCOMPAT
18#UNREGISTER ^pty/ RMOLDCOMPAT
19#REGISTER ^misc/ MKOLDCOMPAT
20#UNREGISTER ^misc/ RMOLDCOMPAT
21
22# You may comment these out if you don't use the original "new" names
23REGISTER .* MKNEWCOMPAT
24UNREGISTER .* RMNEWCOMPAT
25
26# Enable module autoloading. You may comment this out if you don't use
27# autoloading
28# Not supported by busybox
29#LOOKUP .* MODLOAD
30# Maybe one of these works for busybox
31#LOOKUP .* EXECUTE /sbin/modprobe -k -v -C /etc/modules.devfs *
32#REGISTER .* EXECUTE /sbin/modprobe -k -v -C /etc/modules.devfs *
33
34# Uncomment the following if you want to set the group to "tty" for the
35# pseudo-tty devices. This is necessary so that mesg(1) can later be used to
36# enable/disable talk requests and wall(1) messages.
37REGISTER ^pty/s.* PERMISSIONS -1.tty 0600
38#REGISTER ^pts/.* PERMISSIONS -1.tty 0600
39
40# Restoring /dev/log on startup would trigger the minilogd/initlog deadlock
41# (minilogd falsely assuming syslogd has been started).
42REGISTER ^log$ IGNORE
43CREATE ^log$ IGNORE
44CHANGE ^log$ IGNORE
45DELETE ^log$ IGNORE
46
47#
48# Uncomment this if you want permissions to be saved and restored
49# Do not do this for pseudo-terminal devices
50REGISTER ^pt[sy] IGNORE
51CREATE ^pt[sy] IGNORE
52CHANGE ^pt[sy] IGNORE
53DELETE ^pt[sy] IGNORE
54REGISTER .* COPY /lib/dev-state/$devname $devpath
55CREATE .* COPY $devpath /lib/dev-state/$devname
56CHANGE .* COPY $devpath /lib/dev-state/$devname
57#DELETE .* CFUNCTION GLOBAL unlink /lib/dev-state/$devname
58# Busybox
59DELETE .* EXECUTE /bin/rm -f /lib/dev-state/$devname
60
61RESTORE /lib/dev-state
62
63#
64# Uncomment this if you want the old /dev/cdrom symlink
65#REGISTER ^cdroms/cdrom0$ CFUNCTION GLOBAL mksymlink $devname cdrom
66#UNREGISTER ^cdroms/cdrom0$ CFUNCTION GLOBAL unlink cdrom
67# busybox
68REGISTER ^cdroms/cdrom0$ EXECUTE /bin/ln -sf $devname cdrom
69UNREGISTER ^cdroms/cdrom0$ EXECUTE /bin/rm -f cdrom
70
71
72#REGISTER ^v4l/video0$ CFUNCTION GLOBAL mksymlink v4l/video0 video
73#UNREGISTER ^v4l/video0$ CFUNCTION GLOBAL unlink video
74#REGISTER ^radio0$ CFUNCTION GLOBAL mksymlink radio0 radio
75#UNREGISTER ^radio0$ CFUNCTION GLOBAL unlink radio
76# Busybox
77REGISTER ^v4l/video0$ EXECUTE /bin/ln -sf v4l/video0 video
78UNREGISTER ^v4l/video0$ EXECUTE /bin/rm -f video
79REGISTER ^radio0$ EXECUTE /bin/ln -sf radio0 radio
80UNREGISTER ^radio0$ EXECUTE /bin/rm -f radio
81
82# ALSA stuff
83# Not supported by busybox
84#LOOKUP snd MODLOAD ACTION snd
85# Maybe this works for busybox
86#LOOKUP snd EXECUTE /sbin/modprobe -k -v -C /etc/modules.devfs snd
87
88# Uncomment this to let PAM manage devfs
89#REGISTER .* CFUNCTION /lib/security/pam_console_apply_devfsd.so pam_console_apply_single $devpath
90
91# Uncomment this to manage USB mouse
92#REGISTER ^input/mouse0$ CFUNCTION GLOBAL mksymlink $devname usbmouse
93#UNREGISTER ^input/mouse0$ CFUNCTION GLOBAL unlink usbmouse
94# Busybox
95REGISTER ^input/mice$ EXECUTE /bin/ln -sf $devname usbmouse
96UNREGISTER ^input/mice$ EXECUTE /bin/rm -f usbmouse
97
98# If you have removable media and want to force media revalidation when looking
99# up new or old compatibility names, uncomment the following lines
100# SCSI NEWCOMPAT /dev/sd/* names
101LOOKUP ^(sd/c[0-9]+b[0-9]+t[0-9]+u[0-9]+)p[0-9]+$ EXECUTE /bin/dd if=$mntpnt/\1 of=/dev/null count=1
102# SCSI OLDCOMPAT /dev/sd?? names
103LOOKUP ^(sd[a-z]+)[0-9]+$ EXECUTE /bin/dd if=$mntpnt/\1 of=/dev/null count=1
104# IDE NEWCOMPAT /dev/ide/hd/* names
105LOOKUP ^(ide/hd/c[0-9]+b[0-9]+t[0-9]+u[0-9]+)p[0-9]+$ EXECUTE /bin/dd if=$mntpnt/\1 of=/dev/null count=1
106# IDE OLDCOMPAT /dev/hd?? names
107LOOKUP ^(hd[a-z])[0-9]+$ EXECUTE /bin/dd if=$mntpnt/\1 of=/dev/null count=1
108# IDE-SCSI NEWCOMPAT /dev/sd/* names
109#LOOKUP ^(sd/c[0-9]+b[0-9]+t[0-9]+u[0-9]+)p[0-9]+$ EXECUTE /bin/dd if=$mntpnt/\1 of=/dev/null count=1
110# SCSI OLDCOMPAT /dev/scd? names
111LOOKUP ^(scd+)[0-9]+$ EXECUTE /bin/dd if=$mntpnt/\1 of=/dev/null count=1
112
113
114REGISTER ^dvb/card[0-9]+/[^/]+$ PERMISSIONS root.video 0660
115# Busybox
116#REGISTER ^dvb/card([0-9]+)/([^/0-9]*)[0-9]+$ CFUNCTION GLOBAL mksymlink /dev/$devname ost/\2\1
117#UNREGISTER ^dvb/card([0-9]+)/([^/0-9]*)[0-9]+$ CFUNCTION GLOBAL unlink ost/\2\1
118REGISTER ^dvb/card([0-9]+)/([^/0-9]*)[0-9]+$ EXECUTE /bin/ln -sf /dev/$devname ost/\2\1
119UNREGISTER ^dvb/card([0-9]+)/([^/0-9]*)[0-9]+$ EXECUTE /bin/rm -f ost/\2\1
120
121# Include package-generated files from /etc/devfs/conf.d
122# Supported by busybox
123#OPTIONAL_INCLUDE /etc/devfs/conf.d/dvd.conf
124#INCLUDE /etc/devfs/conf.d/dvd.conf
125#OPTIONAL_INCLUDE /etc/devfs/conf.d/
126#INCLUDE /etc/devfs/conf.d/
127
128#/etc/devfs/conf.d/dvd.conf
129#REGISTER ^ide/host0/bus1/target1/lun0/cd$ CFUNCTION GLOBAL mksymlink ide/host0/bus1/target1/lun0/cd dvd
130#UNREGISTER ^ide/host0/bus1/target1/lun0/cd$ CFUNCTION GLOBAL unlink dvd
131REGISTER ^ide/host0/bus1/target1/lun0/cd$ EXECUTE ln -sf ide/host0/bus1/target1/lun0/cd dvd
132UNREGISTER ^ide/host0/bus1/target1/lun0/cd$ EXECUTE rm -f dvd
133
134#/etc/devfs/conf.d/dynamic.conf
135# dynamic desktop and co
136
137REGISTER .*/part.* EXECUTE /etc/dynamic/scripts/part.script add $devpath
138UNREGISTER .*/part.* EXECUTE /etc/dynamic/scripts/part.script del $devpath
139
140REGISTER v4l/video.* EXECUTE /etc/dynamic/scripts/webcam.script add $devpath
141UNREGISTER v4l/video.* EXECUTE /etc/dynamic/scripts/webcam.script del $devpath
142
143REGISTER usb/scanner.* EXECUTE /etc/dynamic/scripts/scanner.script add $devpath
144UNREGISTER usb/scanner.* EXECUTE /etc/dynamic/scripts/scanner.script del $devpath
145
146REGISTER usb/rio500 EXECUTE /etc/dynamic/scripts/rio500.script add $devpath
147UNREGISTER usb/rio500 EXECUTE /etc/dynamic/scripts/rio500.script del $devpath
148
149REGISTER usb/tts/[13579] EXECUTE /etc/dynamic/scripts/visor.script add $devpath
150UNREGISTER usb/tts/[13579] EXECUTE /etc/dynamic/scripts/visor.script del $devpath
151
152REGISTER (usb/lp.*|printers/.*) EXECUTE /etc/dynamic/scripts/lp.script add $devpath
153UNREGISTER (usb/lp.*|printers/.*) EXECUTE /etc/dynamic/scripts/lp.script del $devpath
154
155#/etc/devfs/conf.d/modem.conf
156#REGISTER ^$ CFUNCTION GLOBAL mksymlink modem
157#UNREGISTER ^$ CFUNCTION GLOBAL unlink modem
158REGISTER ^tts/0$ EXECUTE ln -sf $devname modem
159UNREGISTER ^$ EXECUTE rm -f modem
160
161#/etc/devfs/conf.d/mouse.conf
162#REGISTER ^misc/psaux$ CFUNCTION GLOBAL mksymlink misc/psaux mouse
163#UNREGISTER ^misc/psaux$ CFUNCTION GLOBAL unlink mouse
164REGISTER ^misc/psaux$ EXECUTE ln -sf misc/psaux mouse
165UNREGISTER ^misc/psaux$ EXECUTE rm -f mouse
166
167#/etc/devfs/conf.d/psaux.conf
168#REGISTER ^misc/psaux$ CFUNCTION GLOBAL mksymlink misc/psaux psaux
169#UNREGISTER ^misc/psaux$ CFUNCTION GLOBAL unlink psaux
170REGISTER ^misc/psaux$ EXECUTE ln -sf misc/psaux psaux
171UNREGISTER ^misc/psaux$ EXECUTE rm -f psaux
172
173#/etc/devfs/conf.d/rdvd.conf
174REGISTER ^ide/host0/bus1/target1/lun0/cd$ EXECUTE /etc/dynamic/scripts/rawdevice.script add /dev/ide/host0/bus1/target1/lun0/cd /dev/rdvd
175UNREGISTER ^ide/host0/bus1/target1/lun0/cd$ EXECUTE /etc/dynamic/scripts/rawdevice.script del /dev/rdvd
176
177#/etc/devfs/conf.d/ttyS0.conf
178#REGISTER ^tts/0$ CFUNCTION GLOBAL mksymlink tts/0 ttyS0
179#UNREGISTER ^tts/0$ CFUNCTION GLOBAL unlink ttyS0
180REGISTER ^tts/0$ EXECUTE ln -sf $devname ttyS0
181UNREGISTER ^tts/0$ EXECUTE rm -f ttyS0