NAME
update_usbdb − Command to update the data usbmgr uses
SYNTAX
update_usbdb [−dfhs] file
DESCRIPTION
The command update_usbdb creates the configuration data (a directory hierarchy under /etc/usbmgr/{vendor,class}) from the given configuration file (usually /etc/usbmgr/usbmgr.conf).
The directory
hierarchy is as follows:
vendor[/vendor−ID[/product−ID]/module]
Module(s) to be loaded while plugging an USB device of the matching vendor.
class[/class−ID[/subclass−ID[/protocol−ID]]/module]
Module(s) to be loaded while plugging an USB device of the matching class.
vendor[/vendor−ID[/product−ID]/script]
Script to be executed while (un)plugging an USB device of the matching vendor.
class[/class−ID[/subclass−ID[/protocol−ID]]/script]
Script to be executed while (un)plugging an USB device of the matching class.
OPTIONS
−d |
Debug mode. |
|||
−f |
Force update even if it seems to not be needed. |
|||
−h |
Prints help to the syslog, then exit. |
|||
−s |
Don’t open syslog at startup. |
FILES
/etc/usbmgr/usbmgr.conf
/etc/usbmgr/preload.conf
/etc/usbmgr/class
/etc/usbmgr/vendor
ENVIRONMENT VARIABLES
In the scripts, the following environment variables are set:
ACTION |
You can use this environment variable to know if modules are loaded or unloaded. add means that modules are loaded, and remove means that modules are unloaded. | ||
DEVICE |
Points to the (un)loaded module’s /proc file. |
EXAMPLES
To run this program the standard way type:
update_usbdb /etc/usbmgr/usbmgr.conf
The directory hierarchies /etc/usbmgr/class and /etc/usbmgr/vendor will be created.
A sample load/unload script:
#!/bin/sh
case $ACTION in
add)
echo start > /tmp/log
chmod 666 $DEVICE
;;
remove)
echo stop > /tmp/log
chmod 644 $DEVICE
;;
esac
AUTHORS
Shuu Yamaguchi <shuu [AT] wondernetworkresources.com>
This manual page was written by Esteban Manchado Velázquez <zoso [AT] debian.org>, for the Debian GNU/Linux system (but may be used by others).