update_usbdb(8)

update_usbdb8

Command to update the data usbmgr uses

Usage

update_usbdb [-dfhs] file

Overview

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

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

Releases

3 releases since Debian 3.0 (Woody); the text changed 2 times.

  1. 3.0
  2. 3.1
  3. 4.0

-d since Debian 3.1 (Sarge); -f since Debian 3.1 (Sarge); -h since Debian 3.1 (Sarge); -s since Debian 3.1 (Sarge).

Authors

Shuu Yamaguchi <[email protected]>

This manual page was written by Esteban Manchado Velázquez <[email protected]>, for the Debian GNU/Linux system (but may be used by others).

From usbmgr 1.0.0-5 in Debian 4.0 (Etch). Parsed by carta from the page's man source.