blob: e90e7102b1d8d7c13f7625db526490e33d15748e [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
Glenn L McGrath3860b2e2003-11-30 23:46:06 +000028# Supported by busybox when CONFIG_DEVFSD_MODLOAD is set.
29# This actually doesn't work with busybox modutils but needs
30# the real modutils' modprobe
31LOOKUP .* MODLOAD
Glenn L McGrath12940e12003-10-09 13:25:00 +000032
33# Uncomment the following if you want to set the group to "tty" for the
34# pseudo-tty devices. This is necessary so that mesg(1) can later be used to
35# enable/disable talk requests and wall(1) messages.
36REGISTER ^pty/s.* PERMISSIONS -1.tty 0600
37#REGISTER ^pts/.* PERMISSIONS -1.tty 0600
38
39# Restoring /dev/log on startup would trigger the minilogd/initlog deadlock
40# (minilogd falsely assuming syslogd has been started).
41REGISTER ^log$ IGNORE
42CREATE ^log$ IGNORE
43CHANGE ^log$ IGNORE
44DELETE ^log$ IGNORE
45
46#
47# Uncomment this if you want permissions to be saved and restored
48# Do not do this for pseudo-terminal devices
49REGISTER ^pt[sy] IGNORE
50CREATE ^pt[sy] IGNORE
51CHANGE ^pt[sy] IGNORE
52DELETE ^pt[sy] IGNORE
53REGISTER .* COPY /lib/dev-state/$devname $devpath
54CREATE .* COPY $devpath /lib/dev-state/$devname
55CHANGE .* COPY $devpath /lib/dev-state/$devname
56#DELETE .* CFUNCTION GLOBAL unlink /lib/dev-state/$devname
57# Busybox
58DELETE .* EXECUTE /bin/rm -f /lib/dev-state/$devname
59
60RESTORE /lib/dev-state
61
62#
63# Uncomment this if you want the old /dev/cdrom symlink
64#REGISTER ^cdroms/cdrom0$ CFUNCTION GLOBAL mksymlink $devname cdrom
65#UNREGISTER ^cdroms/cdrom0$ CFUNCTION GLOBAL unlink cdrom
66# busybox
67REGISTER ^cdroms/cdrom0$ EXECUTE /bin/ln -sf $devname cdrom
68UNREGISTER ^cdroms/cdrom0$ EXECUTE /bin/rm -f cdrom
69
Glenn L McGrath12940e12003-10-09 13:25:00 +000070#REGISTER ^v4l/video0$ CFUNCTION GLOBAL mksymlink v4l/video0 video
71#UNREGISTER ^v4l/video0$ CFUNCTION GLOBAL unlink video
72#REGISTER ^radio0$ CFUNCTION GLOBAL mksymlink radio0 radio
73#UNREGISTER ^radio0$ CFUNCTION GLOBAL unlink radio
74# Busybox
75REGISTER ^v4l/video0$ EXECUTE /bin/ln -sf v4l/video0 video
76UNREGISTER ^v4l/video0$ EXECUTE /bin/rm -f video
77REGISTER ^radio0$ EXECUTE /bin/ln -sf radio0 radio
78UNREGISTER ^radio0$ EXECUTE /bin/rm -f radio
79
80# ALSA stuff
Glenn L McGrath12940e12003-10-09 13:25:00 +000081#LOOKUP snd MODLOAD ACTION snd
Glenn L McGrath12940e12003-10-09 13:25:00 +000082
83# Uncomment this to let PAM manage devfs
Glenn L McGrath3860b2e2003-11-30 23:46:06 +000084# Not supported by busybox
Glenn L McGrath12940e12003-10-09 13:25:00 +000085#REGISTER .* CFUNCTION /lib/security/pam_console_apply_devfsd.so pam_console_apply_single $devpath
86
87# Uncomment this to manage USB mouse
Glenn L McGrath3860b2e2003-11-30 23:46:06 +000088# Not supported by busybox
Glenn L McGrath12940e12003-10-09 13:25:00 +000089#REGISTER ^input/mouse0$ CFUNCTION GLOBAL mksymlink $devname usbmouse
90#UNREGISTER ^input/mouse0$ CFUNCTION GLOBAL unlink usbmouse
91# Busybox
Glenn L McGrath3860b2e2003-11-30 23:46:06 +000092#REGISTER ^input/mouse0$ EXECUTE /bin/ln -sf $devname usbmouse
93#UNREGISTER ^input/mouse0$ EXECUTE /bin/rm -f usbmouse
94# Not supported by busybox
95#REGISTER ^input/mice$ CFUNCTION GLOBAL mksymlink $devname usbmouse
96#UNREGISTER ^input/mice$ CFUNCTION GLOBAL unlink usbmouse
97# Busybox
Glenn L McGrath12940e12003-10-09 13:25:00 +000098REGISTER ^input/mice$ EXECUTE /bin/ln -sf $devname usbmouse
99UNREGISTER ^input/mice$ EXECUTE /bin/rm -f usbmouse
100
101# If you have removable media and want to force media revalidation when looking
102# up new or old compatibility names, uncomment the following lines
103# SCSI NEWCOMPAT /dev/sd/* names
104LOOKUP ^(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
105# SCSI OLDCOMPAT /dev/sd?? names
106LOOKUP ^(sd[a-z]+)[0-9]+$ EXECUTE /bin/dd if=$mntpnt/\1 of=/dev/null count=1
107# IDE NEWCOMPAT /dev/ide/hd/* names
108LOOKUP ^(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
109# IDE OLDCOMPAT /dev/hd?? names
110LOOKUP ^(hd[a-z])[0-9]+$ EXECUTE /bin/dd if=$mntpnt/\1 of=/dev/null count=1
111# IDE-SCSI NEWCOMPAT /dev/sd/* names
112#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
Glenn L McGrath3860b2e2003-11-30 23:46:06 +0000113#SCSI OLDCOMPAT /dev/scd? names
Glenn L McGrath12940e12003-10-09 13:25:00 +0000114LOOKUP ^(scd+)[0-9]+$ EXECUTE /bin/dd if=$mntpnt/\1 of=/dev/null count=1
115
116
117REGISTER ^dvb/card[0-9]+/[^/]+$ PERMISSIONS root.video 0660
Glenn L McGrath3860b2e2003-11-30 23:46:06 +0000118# Not supported by busybox
Glenn L McGrath12940e12003-10-09 13:25:00 +0000119#REGISTER ^dvb/card([0-9]+)/([^/0-9]*)[0-9]+$ CFUNCTION GLOBAL mksymlink /dev/$devname ost/\2\1
120#UNREGISTER ^dvb/card([0-9]+)/([^/0-9]*)[0-9]+$ CFUNCTION GLOBAL unlink ost/\2\1
Glenn L McGrath3860b2e2003-11-30 23:46:06 +0000121# Busybox
Glenn L McGrath12940e12003-10-09 13:25:00 +0000122REGISTER ^dvb/card([0-9]+)/([^/0-9]*)[0-9]+$ EXECUTE /bin/ln -sf /dev/$devname ost/\2\1
123UNREGISTER ^dvb/card([0-9]+)/([^/0-9]*)[0-9]+$ EXECUTE /bin/rm -f ost/\2\1
124
125# Include package-generated files from /etc/devfs/conf.d
126# Supported by busybox
Glenn L McGrath3860b2e2003-11-30 23:46:06 +0000127# INCLUDE /etc/devfs/conf.d/
128INCLUDE /etc/devfs/busybox/
129# Busybox: just for testing
130#INCLUDE /etc/devfs/nothing/
131#INCLUDE /etc/devfs/nothing/nothing
132#OPTIONAL_INCLUDE /etc/devfs/nothing/
133#OPTIONAL_INCLUDE /etc/devfs/nothing/nothing