Added debian/ from 1:1.10.2-1 debian package
[busybox4maemo] / examples / devfsd.conf
1 # 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!
9 REGISTER        .*              MKOLDCOMPAT
10 UNREGISTER      .*              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
23 REGISTER        .*              MKNEWCOMPAT
24 UNREGISTER      .*              RMNEWCOMPAT
25
26 # Enable module autoloading. You may comment this out if you don't use
27 # autoloading
28 # 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
31 LOOKUP          .*              MODLOAD
32
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.
36 REGISTER        ^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).
41 REGISTER        ^log$           IGNORE
42 CREATE          ^log$           IGNORE
43 CHANGE          ^log$           IGNORE
44 DELETE          ^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
49 REGISTER        ^pt[sy]         IGNORE
50 CREATE          ^pt[sy]         IGNORE
51 CHANGE          ^pt[sy]         IGNORE
52 DELETE          ^pt[sy]         IGNORE
53 REGISTER        .*              COPY    /lib/dev-state/$devname $devpath
54 CREATE          .*              COPY    $devpath /lib/dev-state/$devname
55 CHANGE          .*              COPY    $devpath /lib/dev-state/$devname
56 #DELETE         .*              CFUNCTION GLOBAL unlink /lib/dev-state/$devname
57 # Busybox
58 DELETE          .*              EXECUTE /bin/rm -f              /lib/dev-state/$devname
59
60 RESTORE         /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
67 REGISTER        ^cdroms/cdrom0$ EXECUTE /bin/ln -sf $devname cdrom
68 UNREGISTER      ^cdroms/cdrom0$ EXECUTE /bin/rm -f cdrom
69
70 #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
75 REGISTER        ^v4l/video0$    EXECUTE /bin/ln -sf v4l/video0 video
76 UNREGISTER      ^v4l/video0$    EXECUTE /bin/rm -f video
77 REGISTER        ^radio0$                EXECUTE /bin/ln -sf  radio0 radio
78 UNREGISTER      ^radio0$                EXECUTE /bin/rm -f radio
79
80 # ALSA stuff
81 #LOOKUP         snd             MODLOAD ACTION snd
82
83 # Uncomment this to let PAM manage devfs
84 # Not supported by busybox
85 #REGISTER       .*              CFUNCTION /lib/security/pam_console_apply_devfsd.so pam_console_apply_single $devpath
86
87 # Uncomment this to manage USB mouse
88 # Not supported by busybox
89 #REGISTER       ^input/mouse0$  CFUNCTION GLOBAL mksymlink $devname usbmouse
90 #UNREGISTER     ^input/mouse0$  CFUNCTION GLOBAL unlink usbmouse
91 # Busybox
92 #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
98 REGISTER        ^input/mice$    EXECUTE /bin/ln -sf $devname usbmouse
99 UNREGISTER      ^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
104 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
105 # SCSI OLDCOMPAT  /dev/sd?? names
106 LOOKUP          ^(sd[a-z]+)[0-9]+$      EXECUTE /bin/dd if=$mntpnt/\1 of=/dev/null count=1
107 # IDE NEWCOMPAT   /dev/ide/hd/* names
108 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
109 # IDE OLDCOMPAT   /dev/hd?? names
110 LOOKUP          ^(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
113 #SCSI OLDCOMPAT  /dev/scd? names
114 LOOKUP          ^(scd+)[0-9]+$  EXECUTE /bin/dd if=$mntpnt/\1 of=/dev/null count=1
115
116
117 REGISTER ^dvb/card[0-9]+/[^/]+$ PERMISSIONS root.video 0660
118 # Not supported by busybox
119 #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
121 # Busybox
122 REGISTER        ^dvb/card([0-9]+)/([^/0-9]*)[0-9]+$     EXECUTE /bin/ln -sf /dev/$devname ost/\2\1
123 UNREGISTER      ^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
127 # INCLUDE   /etc/devfs/conf.d/
128 INCLUDE   /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