Patch from Tito, size optimisation, cleanup noise when in debugging
mode, adds support for MODLOAD keyword in devfsd.conf, provides a cleaned up version of example/devfsd.conf
This commit is contained in:
@ -25,11 +25,10 @@ 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 *
|
||||
# Supported by busybox when CONFIG_DEVFSD_MODLOAD is set.
|
||||
# This actually doesn't work with busybox modutils but needs
|
||||
# the real modutils' modprobe
|
||||
LOOKUP .* MODLOAD
|
||||
|
||||
# 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
|
||||
@ -68,7 +67,6 @@ RESTORE /lib/dev-state
|
||||
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
|
||||
@ -80,18 +78,23 @@ 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
|
||||
# Not supported by busybox
|
||||
#REGISTER .* CFUNCTION /lib/security/pam_console_apply_devfsd.so pam_console_apply_single $devpath
|
||||
|
||||
# Uncomment this to manage USB mouse
|
||||
# Not supported by busybox
|
||||
#REGISTER ^input/mouse0$ CFUNCTION GLOBAL mksymlink $devname usbmouse
|
||||
#UNREGISTER ^input/mouse0$ CFUNCTION GLOBAL unlink usbmouse
|
||||
# Busybox
|
||||
#REGISTER ^input/mouse0$ EXECUTE /bin/ln -sf $devname usbmouse
|
||||
#UNREGISTER ^input/mouse0$ EXECUTE /bin/rm -f usbmouse
|
||||
# Not supported by busybox
|
||||
#REGISTER ^input/mice$ CFUNCTION GLOBAL mksymlink $devname usbmouse
|
||||
#UNREGISTER ^input/mice$ CFUNCTION GLOBAL unlink usbmouse
|
||||
# Busybox
|
||||
REGISTER ^input/mice$ EXECUTE /bin/ln -sf $devname usbmouse
|
||||
UNREGISTER ^input/mice$ EXECUTE /bin/rm -f usbmouse
|
||||
|
||||
@ -107,75 +110,24 @@ LOOKUP ^(ide/hd/c[0-9]+b[0-9]+t[0-9]+u[0-9]+)p[0-9]+$ EXECUTE /bin/dd if=$mntpn
|
||||
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
|
||||
#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
|
||||
# Not supported by 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
|
||||
# Busybox
|
||||
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
|
||||
# INCLUDE /etc/devfs/conf.d/
|
||||
INCLUDE /etc/devfs/busybox/
|
||||
# Busybox: just for testing
|
||||
#INCLUDE /etc/devfs/nothing/
|
||||
#INCLUDE /etc/devfs/nothing/nothing
|
||||
#OPTIONAL_INCLUDE /etc/devfs/nothing/
|
||||
#OPTIONAL_INCLUDE /etc/devfs/nothing/nothing
|
||||
|
Reference in New Issue
Block a user