diff options
| author | Glenn L McGrath <bug1@ihug.co.nz> | 2003-10-09 13:25:00 +0000 |
|---|---|---|
| committer | Glenn L McGrath <bug1@ihug.co.nz> | 2003-10-09 13:25:00 +0000 |
| commit | 12940e1ce0cb23192989a016e9cb87262afe3721 (patch) | |
| tree | ee80ead60b5fff8d65e5749d7a10293b9d9657b8 /examples | |
| parent | 17d21fa5191bd3298e9bee66e2fcc9afb24a9649 (diff) | |
| download | busybox-w32-12940e1ce0cb23192989a016e9cb87262afe3721.tar.gz busybox-w32-12940e1ce0cb23192989a016e9cb87262afe3721.tar.bz2 busybox-w32-12940e1ce0cb23192989a016e9cb87262afe3721.zip | |
example devfs config file, patch from Tito.
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/devfsd.conf | 181 |
1 files changed, 181 insertions, 0 deletions
diff --git a/examples/devfsd.conf b/examples/devfsd.conf new file mode 100644 index 000000000..ea7334374 --- /dev/null +++ b/examples/devfsd.conf | |||
| @@ -0,0 +1,181 @@ | |||
| 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 | # 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. | ||
| 37 | REGISTER ^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). | ||
| 42 | REGISTER ^log$ IGNORE | ||
| 43 | CREATE ^log$ IGNORE | ||
| 44 | CHANGE ^log$ IGNORE | ||
| 45 | DELETE ^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 | ||
| 50 | REGISTER ^pt[sy] IGNORE | ||
| 51 | CREATE ^pt[sy] IGNORE | ||
| 52 | CHANGE ^pt[sy] IGNORE | ||
| 53 | DELETE ^pt[sy] IGNORE | ||
| 54 | REGISTER .* COPY /lib/dev-state/$devname $devpath | ||
| 55 | CREATE .* COPY $devpath /lib/dev-state/$devname | ||
| 56 | CHANGE .* COPY $devpath /lib/dev-state/$devname | ||
| 57 | #DELETE .* CFUNCTION GLOBAL unlink /lib/dev-state/$devname | ||
| 58 | # Busybox | ||
| 59 | DELETE .* EXECUTE /bin/rm -f /lib/dev-state/$devname | ||
| 60 | |||
| 61 | RESTORE /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 | ||
| 68 | REGISTER ^cdroms/cdrom0$ EXECUTE /bin/ln -sf $devname cdrom | ||
| 69 | UNREGISTER ^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 | ||
| 77 | REGISTER ^v4l/video0$ EXECUTE /bin/ln -sf v4l/video0 video | ||
| 78 | UNREGISTER ^v4l/video0$ EXECUTE /bin/rm -f video | ||
| 79 | REGISTER ^radio0$ EXECUTE /bin/ln -sf radio0 radio | ||
| 80 | UNREGISTER ^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 | ||
| 95 | REGISTER ^input/mice$ EXECUTE /bin/ln -sf $devname usbmouse | ||
| 96 | UNREGISTER ^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 | ||
| 101 | 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 | ||
| 102 | # SCSI OLDCOMPAT /dev/sd?? names | ||
| 103 | LOOKUP ^(sd[a-z]+)[0-9]+$ EXECUTE /bin/dd if=$mntpnt/\1 of=/dev/null count=1 | ||
| 104 | # IDE NEWCOMPAT /dev/ide/hd/* names | ||
| 105 | 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 | ||
| 106 | # IDE OLDCOMPAT /dev/hd?? names | ||
| 107 | LOOKUP ^(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 | ||
| 111 | LOOKUP ^(scd+)[0-9]+$ EXECUTE /bin/dd if=$mntpnt/\1 of=/dev/null count=1 | ||
| 112 | |||
| 113 | |||
| 114 | REGISTER ^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 | ||
| 118 | REGISTER ^dvb/card([0-9]+)/([^/0-9]*)[0-9]+$ EXECUTE /bin/ln -sf /dev/$devname ost/\2\1 | ||
| 119 | UNREGISTER ^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 | ||
| 131 | REGISTER ^ide/host0/bus1/target1/lun0/cd$ EXECUTE ln -sf ide/host0/bus1/target1/lun0/cd dvd | ||
| 132 | UNREGISTER ^ide/host0/bus1/target1/lun0/cd$ EXECUTE rm -f dvd | ||
| 133 | |||
| 134 | #/etc/devfs/conf.d/dynamic.conf | ||
| 135 | # dynamic desktop and co | ||
| 136 | |||
| 137 | REGISTER .*/part.* EXECUTE /etc/dynamic/scripts/part.script add $devpath | ||
| 138 | UNREGISTER .*/part.* EXECUTE /etc/dynamic/scripts/part.script del $devpath | ||
| 139 | |||
| 140 | REGISTER v4l/video.* EXECUTE /etc/dynamic/scripts/webcam.script add $devpath | ||
| 141 | UNREGISTER v4l/video.* EXECUTE /etc/dynamic/scripts/webcam.script del $devpath | ||
| 142 | |||
| 143 | REGISTER usb/scanner.* EXECUTE /etc/dynamic/scripts/scanner.script add $devpath | ||
| 144 | UNREGISTER usb/scanner.* EXECUTE /etc/dynamic/scripts/scanner.script del $devpath | ||
| 145 | |||
| 146 | REGISTER usb/rio500 EXECUTE /etc/dynamic/scripts/rio500.script add $devpath | ||
| 147 | UNREGISTER usb/rio500 EXECUTE /etc/dynamic/scripts/rio500.script del $devpath | ||
| 148 | |||
| 149 | REGISTER usb/tts/[13579] EXECUTE /etc/dynamic/scripts/visor.script add $devpath | ||
| 150 | UNREGISTER usb/tts/[13579] EXECUTE /etc/dynamic/scripts/visor.script del $devpath | ||
| 151 | |||
| 152 | REGISTER (usb/lp.*|printers/.*) EXECUTE /etc/dynamic/scripts/lp.script add $devpath | ||
| 153 | UNREGISTER (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 | ||
| 158 | REGISTER ^tts/0$ EXECUTE ln -sf $devname modem | ||
| 159 | UNREGISTER ^$ 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 | ||
| 164 | REGISTER ^misc/psaux$ EXECUTE ln -sf misc/psaux mouse | ||
| 165 | UNREGISTER ^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 | ||
| 170 | REGISTER ^misc/psaux$ EXECUTE ln -sf misc/psaux psaux | ||
| 171 | UNREGISTER ^misc/psaux$ EXECUTE rm -f psaux | ||
| 172 | |||
| 173 | #/etc/devfs/conf.d/rdvd.conf | ||
| 174 | REGISTER ^ide/host0/bus1/target1/lun0/cd$ EXECUTE /etc/dynamic/scripts/rawdevice.script add /dev/ide/host0/bus1/target1/lun0/cd /dev/rdvd | ||
| 175 | UNREGISTER ^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 | ||
| 180 | REGISTER ^tts/0$ EXECUTE ln -sf $devname ttyS0 | ||
| 181 | UNREGISTER ^tts/0$ EXECUTE rm -f ttyS0 | ||
