aboutsummaryrefslogtreecommitdiff
path: root/examples/devfsd.conf
blob: ea73343749bb885260ab2711658f4e9a98ab7a35 (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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
# Sample /etc/devfsd.conf configuration file.
# Richard Gooch  <rgooch@atnf.csiro.au>		17-FEB-2002
#
# adapted for busybox devfsd implementation by Tito <farmatito@tiscali.it>
#
# 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
# Not supported by busybox
#LOOKUP		.*		MODLOAD
# Maybe one of these works for busybox
#LOOKUP		.*		EXECUTE /sbin/modprobe -k -v -C /etc/modules.devfs *
#REGISTER	.*		EXECUTE /sbin/modprobe -k -v -C /etc/modules.devfs *

# 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

# Restoring /dev/log on startup would trigger the minilogd/initlog deadlock
# (minilogd falsely assuming syslogd has been started).
REGISTER	^log$		IGNORE
CREATE		^log$		IGNORE
CHANGE		^log$		IGNORE
DELETE		^log$		IGNORE

#
# Uncomment this if you want permissions to be saved and restored
# Do not do this for pseudo-terminal devices
REGISTER	^pt[sy]		IGNORE
CREATE		^pt[sy]		IGNORE
CHANGE		^pt[sy]		IGNORE
DELETE		^pt[sy]		IGNORE
REGISTER	.*		COPY	/lib/dev-state/$devname $devpath
CREATE		.*		COPY	$devpath /lib/dev-state/$devname
CHANGE		.*		COPY	$devpath /lib/dev-state/$devname
#DELETE		.*		CFUNCTION GLOBAL unlink /lib/dev-state/$devname
# Busybox
DELETE		.*		EXECUTE /bin/rm -f		/lib/dev-state/$devname

RESTORE		/lib/dev-state

#
# Uncomment this if you want the old /dev/cdrom symlink
#REGISTER	^cdroms/cdrom0$	CFUNCTION GLOBAL mksymlink $devname cdrom
#UNREGISTER	^cdroms/cdrom0$	CFUNCTION GLOBAL unlink cdrom
# busybox
REGISTER	^cdroms/cdrom0$	EXECUTE /bin/ln -sf $devname cdrom
UNREGISTER	^cdroms/cdrom0$	EXECUTE /bin/rm -f cdrom


#REGISTER	^v4l/video0$	CFUNCTION GLOBAL mksymlink v4l/video0 video
#UNREGISTER	^v4l/video0$	CFUNCTION GLOBAL unlink video
#REGISTER	^radio0$	CFUNCTION GLOBAL mksymlink radio0 radio
#UNREGISTER	^radio0$	CFUNCTION GLOBAL unlink radio
# Busybox
REGISTER	^v4l/video0$	EXECUTE /bin/ln -sf v4l/video0 video
UNREGISTER	^v4l/video0$	EXECUTE /bin/rm -f video
REGISTER	^radio0$		EXECUTE /bin/ln -sf  radio0 radio
UNREGISTER	^radio0$		EXECUTE /bin/rm -f radio

# ALSA stuff
# Not supported by busybox
#LOOKUP 		snd 		MODLOAD ACTION snd
# Maybe this works for busybox
#LOOKUP			snd 		EXECUTE /sbin/modprobe -k -v -C /etc/modules.devfs snd

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

# Uncomment this to manage USB mouse
#REGISTER	^input/mouse0$	CFUNCTION GLOBAL mksymlink $devname usbmouse
#UNREGISTER	^input/mouse0$	CFUNCTION GLOBAL unlink usbmouse
# Busybox
REGISTER	^input/mice$	EXECUTE /bin/ln -sf $devname usbmouse
UNREGISTER	^input/mice$	EXECUTE /bin/rm -f usbmouse

# If you have removable media and want to force media revalidation when looking
# up new or old compatibility names, uncomment the following lines
# SCSI NEWCOMPAT  /dev/sd/* names
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
# SCSI OLDCOMPAT  /dev/sd?? names
LOOKUP		^(sd[a-z]+)[0-9]+$	EXECUTE /bin/dd if=$mntpnt/\1 of=/dev/null count=1
# IDE NEWCOMPAT   /dev/ide/hd/* names
LOOKUP		^(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
# IDE OLDCOMPAT   /dev/hd?? names
LOOKUP		^(hd[a-z])[0-9]+$	EXECUTE /bin/dd if=$mntpnt/\1 of=/dev/null count=1
# IDE-SCSI NEWCOMPAT  /dev/sd/* names
#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
# SCSI OLDCOMPAT  /dev/scd? names
LOOKUP		^(scd+)[0-9]+$	EXECUTE /bin/dd if=$mntpnt/\1 of=/dev/null count=1


REGISTER ^dvb/card[0-9]+/[^/]+$ PERMISSIONS root.video 0660
# Busybox
#REGISTER	^dvb/card([0-9]+)/([^/0-9]*)[0-9]+$	CFUNCTION GLOBAL mksymlink /dev/$devname ost/\2\1
#UNREGISTER	^dvb/card([0-9]+)/([^/0-9]*)[0-9]+$	CFUNCTION GLOBAL unlink ost/\2\1
REGISTER	^dvb/card([0-9]+)/([^/0-9]*)[0-9]+$	EXECUTE /bin/ln -sf /dev/$devname ost/\2\1
UNREGISTER	^dvb/card([0-9]+)/([^/0-9]*)[0-9]+$	EXECUTE /bin/rm -f ost/\2\1

# Include package-generated files from /etc/devfs/conf.d
# Supported by busybox
#OPTIONAL_INCLUDE   /etc/devfs/conf.d/dvd.conf
#INCLUDE   /etc/devfs/conf.d/dvd.conf
#OPTIONAL_INCLUDE   /etc/devfs/conf.d/
#INCLUDE   /etc/devfs/conf.d/

#/etc/devfs/conf.d/dvd.conf
#REGISTER	^ide/host0/bus1/target1/lun0/cd$	CFUNCTION GLOBAL mksymlink ide/host0/bus1/target1/lun0/cd dvd
#UNREGISTER	^ide/host0/bus1/target1/lun0/cd$	CFUNCTION GLOBAL unlink dvd
REGISTER	^ide/host0/bus1/target1/lun0/cd$	EXECUTE ln -sf ide/host0/bus1/target1/lun0/cd dvd
UNREGISTER	^ide/host0/bus1/target1/lun0/cd$	EXECUTE rm -f dvd

#/etc/devfs/conf.d/dynamic.conf
# dynamic desktop and co

REGISTER	.*/part.*	EXECUTE /etc/dynamic/scripts/part.script add $devpath
UNREGISTER	.*/part.*	EXECUTE /etc/dynamic/scripts/part.script del $devpath

REGISTER	v4l/video.*	EXECUTE /etc/dynamic/scripts/webcam.script add $devpath
UNREGISTER	v4l/video.*	EXECUTE /etc/dynamic/scripts/webcam.script del $devpath

REGISTER	usb/scanner.*	EXECUTE /etc/dynamic/scripts/scanner.script add $devpath
UNREGISTER	usb/scanner.*	EXECUTE /etc/dynamic/scripts/scanner.script del $devpath

REGISTER	usb/rio500	EXECUTE /etc/dynamic/scripts/rio500.script add $devpath
UNREGISTER	usb/rio500	EXECUTE /etc/dynamic/scripts/rio500.script del $devpath

REGISTER	usb/tts/[13579]	EXECUTE /etc/dynamic/scripts/visor.script add $devpath
UNREGISTER	usb/tts/[13579]	EXECUTE /etc/dynamic/scripts/visor.script del $devpath

REGISTER	(usb/lp.*|printers/.*)	EXECUTE /etc/dynamic/scripts/lp.script add $devpath
UNREGISTER	(usb/lp.*|printers/.*)	EXECUTE /etc/dynamic/scripts/lp.script del $devpath

#/etc/devfs/conf.d/modem.conf
#REGISTER	^$	CFUNCTION GLOBAL mksymlink  modem
#UNREGISTER	^$	CFUNCTION GLOBAL unlink modem
REGISTER	^tts/0$	EXECUTE ln -sf  $devname modem
UNREGISTER	^$	EXECUTE rm -f modem

#/etc/devfs/conf.d/mouse.conf
#REGISTER	^misc/psaux$	CFUNCTION GLOBAL mksymlink misc/psaux mouse
#UNREGISTER	^misc/psaux$	CFUNCTION GLOBAL unlink mouse
REGISTER	^misc/psaux$	EXECUTE ln -sf misc/psaux mouse
UNREGISTER	^misc/psaux$	EXECUTE rm -f mouse

#/etc/devfs/conf.d/psaux.conf
#REGISTER	^misc/psaux$	CFUNCTION GLOBAL mksymlink misc/psaux psaux
#UNREGISTER	^misc/psaux$	CFUNCTION GLOBAL unlink psaux
REGISTER	^misc/psaux$	EXECUTE ln -sf misc/psaux psaux
UNREGISTER	^misc/psaux$	EXECUTE rm -f psaux

#/etc/devfs/conf.d/rdvd.conf
REGISTER	^ide/host0/bus1/target1/lun0/cd$	EXECUTE /etc/dynamic/scripts/rawdevice.script add /dev/ide/host0/bus1/target1/lun0/cd /dev/rdvd
UNREGISTER	^ide/host0/bus1/target1/lun0/cd$	EXECUTE /etc/dynamic/scripts/rawdevice.script del /dev/rdvd

#/etc/devfs/conf.d/ttyS0.conf
#REGISTER	^tts/0$	CFUNCTION GLOBAL mksymlink tts/0 ttyS0
#UNREGISTER	^tts/0$	CFUNCTION GLOBAL unlink ttyS0
REGISTER	^tts/0$	EXECUTE ln -sf $devname ttyS0
UNREGISTER	^tts/0$	EXECUTE rm -f ttyS0