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.
Command to update the data usbmgr uses
update_usbdb [-dfhs]
file
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:
|
Module(s) to be loaded while plugging an USB device of the matching vendor. |
|---|---|
|
Module(s) to be loaded while plugging an USB device of the matching class. |
|
Script to be executed while (un)plugging an USB device of the matching vendor. |
|
Script to be executed while (un)plugging an USB device of the matching class. |
-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.
/etc/usbmgr/usbmgr.conf
/etc/usbmgr/preload.conf
/etc/usbmgr/class
/etc/usbmgr/vendor
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.
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
3 releases since Debian 3.0 (Woody); the text changed 2 times.
-d since Debian 3.1 (Sarge);
-f since Debian 3.1 (Sarge);
-h since Debian 3.1 (Sarge);
-s since Debian 3.1 (Sarge).