| 1 |
# Sample /etc/devfsd.conf configuration file. |
| 2 |
# Richard Gooch <rgooch@atnf.csiro.au> 3-JUL-2000 |
| 3 |
# |
| 4 |
# The Gentoo Linux Team - http://www.gentoo.org/ |
| 5 |
# - Many fixes, etc |
| 6 |
# |
| 7 |
# $Header$ |
| 8 |
|
| 9 |
# Enable full compatibility mode for old device names. You may comment these |
| 10 |
# out if you don't use the old device names. Make sure you know what you're |
| 11 |
# doing! |
| 12 |
REGISTER .* MKOLDCOMPAT |
| 13 |
UNREGISTER .* RMOLDCOMPAT |
| 14 |
|
| 15 |
# You may comment out the above and uncomment the following if you've |
| 16 |
# configured your system to use the original "new" devfs names or the really |
| 17 |
# new names |
| 18 |
#REGISTER vc/.* MKOLDCOMPAT |
| 19 |
#UNREGISTER vc/.* RMOLDCOMPAT |
| 20 |
#REGISTER pty/.* MKOLDCOMPAT |
| 21 |
#UNREGISTER pty/.* RMOLDCOMPAT |
| 22 |
#REGISTER misc MKOLDCOMPAT |
| 23 |
#UNREGISTER misc RMOLDCOMPAT |
| 24 |
|
| 25 |
# You may comment these out if you don't use the original "new" names |
| 26 |
REGISTER .* MKNEWCOMPAT |
| 27 |
UNREGISTER .* RMNEWCOMPAT |
| 28 |
|
| 29 |
# Enable module autoloading. You may comment this out if you don't use |
| 30 |
# autoloading |
| 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 |
# Uncomment this if you want permissions to be saved and restored |
| 40 |
# NB: Do NOT change the following! |
| 41 |
# Do not do this for pseudo-terminal devices |
| 42 |
REGISTER ^pt[sy]/.* IGNORE |
| 43 |
CHANGE ^pt[sy]/.* IGNORE |
| 44 |
CREATE ^pt[sy]/.* IGNORE |
| 45 |
DELETE ^pt[sy] IGNORE |
| 46 |
REGISTER .* COPY /lib/dev-state/$devname $devpath |
| 47 |
CHANGE .* COPY $devpath /lib/dev-state/$devname |
| 48 |
CREATE .* COPY $devpath /lib/dev-state/$devname |
| 49 |
DELETE .* CFUNCTION GLOBAL unlink /lib/dev-state/$devname |
| 50 |
RESTORE /lib/dev-state |
| 51 |
|
| 52 |
# You can force default like this : |
| 53 |
# PERMISSIONS owner_and_group access_mode |
| 54 |
|
| 55 |
# Video4Linux devices |
| 56 |
REGISTER v4l/.* PERMISSIONS root.video 660 |
| 57 |
|
| 58 |
# ALSA/OSS stuff |
| 59 |
# Comment/change these if you want to change the permissions on |
| 60 |
# the audio devices |
| 61 |
LOOKUP snd MODLOAD ACTION snd |
| 62 |
LOOKUP dsp MODLOAD |
| 63 |
LOOKUP mixer MODLOAD |
| 64 |
LOOKUP midi MODLOAD |
| 65 |
REGISTER sound/.* PERMISSIONS root.audio 660 |
| 66 |
REGISTER snd/.* PERMISSIONS root.audio 660 |
| 67 |
|
| 68 |
# Uncomment this to let PAM manage devfs |
| 69 |
#REGISTER .* CFUNCTION /lib/security/pam_console_apply_devfsd.so pam_console_apply_single $devpath |
| 70 |
|
| 71 |
# Autoload the sg module if generic scsi driver compiled as module. |
| 72 |
#LOOKUP ^sg$ MODLOAD ACTION sg |
| 73 |
|
| 74 |
# Give the cdrw group write permissions to /dev/sg0 |
| 75 |
# This is done to have non root user use the burner (scan the scsi bus) |
| 76 |
#REGISTER ^scsi/host.*/bus.*/target.*/lun.*/generic PERMISSIONS root.cdrw 660 |
| 77 |
|
| 78 |
# General note for the following auto creation of symlinks: |
| 79 |
# |
| 80 |
# If you change the device that the symlink points to, |
| 81 |
# you should also remove the symlink before restarting |
| 82 |
# devfsd |
| 83 |
|
| 84 |
# Create /dev/cdrom for the first cdrom drive |
| 85 |
LOOKUP ^cdrom$ CFUNCTION GLOBAL mksymlink cdroms/cdrom0 cdrom |
| 86 |
REGISTER ^cdroms/cdrom0$ CFUNCTION GLOBAL mksymlink $devname cdrom |
| 87 |
UNREGISTER ^cdroms/cdrom0$ CFUNCTION GLOBAL unlink cdrom |
| 88 |
|
| 89 |
# Create /dev/dvd for the second cdrom drive |
| 90 |
# (change 'cdroms/cdrom1' to suite your setup) |
| 91 |
# NOTE: We add the fully qualified path here, else some apps |
| 92 |
# have problems to resolve the true device (drip comes to mind) |
| 93 |
#LOOKUP ^dvd$ CFUNCTION GLOBAL mksymlink ${mntpnt}/cdroms/cdrom1 dvd |
| 94 |
#REGISTER ^cdroms/cdrom1$ CFUNCTION GLOBAL mksymlink ${devpath} dvd |
| 95 |
#UNREGISTER ^cdroms/cdrom1$ CFUNCTION GLOBAL unlink dvd |
| 96 |
|
| 97 |
# Create /dev/cdrw for the first cdrom on the scsi bus |
| 98 |
# (change 'sr0' to suite your setup) |
| 99 |
#LOOKUP ^cdrw$ CFUNCTION GLOBAL mksymlink sr0 cdrw |
| 100 |
#REGISTER ^sr0$ CFUNCTION GLOBAL mksymlink $devname cdrw |
| 101 |
#UNREGISTER ^sr0$ CFUNCTION GLOBAL unlink cdrw |
| 102 |
|
| 103 |
# Create /dev/mouse |
| 104 |
LOOKUP ^mouse$ CFUNCTION GLOBAL mksymlink misc/psaux mouse |
| 105 |
REGISTER ^misc/psaux$ CFUNCTION GLOBAL mksymlink $devname mouse |
| 106 |
UNREGISTER ^misc/psaux$ CFUNCTION GLOBAL unlink mouse |
| 107 |
|
| 108 |
# Manage USB mouse |
| 109 |
REGISTER ^input/mouse0$ CFUNCTION GLOBAL mksymlink $devname usbmouse |
| 110 |
UNREGISTER ^input/mouse0$ CFUNCTION GLOBAL unlink usbmouse |
| 111 |
REGISTER ^input/mice$ CFUNCTION GLOBAL mksymlink $devname usbmouse |
| 112 |
UNREGISTER ^input/mice$ CFUNCTION GLOBAL unlink usbmouse |
| 113 |
|
| 114 |
# Support additional config installed by packages ... |
| 115 |
INCLUDE /etc/devfs.d |
| 116 |
|
| 117 |
# devfsd.conf ends here |