---
name: "update_usbdb"
section: "8"
platform: "linux"
package: "usbmgr"
version: "1.0.0-5"
release: "Debian 4.0 (Etch)"
platforms: ["linux"]
url: "https://new.carta.tech/update_usbdb"
---

# update\_usbdb(8)

Command to update the data usbmgr uses

## 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@wondernetworkresources.com\>

This manual page was written by Esteban Manchado Velázquez \<zoso@debian.org\>, for the Debian GNU/Linux system (but may be used by others).

## SEE ALSO

[**usbmgr**(8)](/usbmgr/8.md), [**dump\_usbdev**(8)](/dump_usbdev/8.md), [**usbmgr.conf**(5)](/usbmgr.conf/5.md)
