File: README

package info (click to toggle)
usbmount 0.0.10
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 76 kB
  • ctags: 2
  • sloc: sh: 185; makefile: 1
file content (49 lines) | stat: -rw-r--r-- 2,156 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
USBmount
========

The USBmount package automatically mounts USB mass storage devices
(typically USB pens) when they are plugged in, and unmounts them when
they are removed. The mountpoints (/media/usb[0-7] by default),
filesystem types to consider, and mount options are configurable. When
multiple devices are plugged in, the first available mountpoint is
automatically selected. If the device provides a model name, a symbolic
link /var/run/usbmount/MODELNAME pointing to the mountpoint is auto-
matically created.

The script that does the (un)mounting is called by the udev daemon.
Therefore, USBmount requires a 2.6 (or newer) kernel.

USBmount is intended as a lightweight solution which is independent of a
desktop environment. Users which would like an icon to appear when an
USB device is plugged in should use the pmount and hal packages instead.

The comments in the configuration file /etc/usbmount/usbmount.conf
describe how to configure the package.


Hook Scripts
------------

After a device or partition has been mounted, the command 'run-parts
/etc/usbmount/mount.d' is executed. This runs all scripts in
/etc/usbmount/mount.d which adhere to a certain naming convention; see
the run-parts manual page for details.

The following environment variables are available to the scripts (in
addition to those set in /etc/usbmount/usbmount.conf and by the hotplug
and udev systems):

UM_DEVICE       - filename of the device node
UM_MOUNTPOINT   - mointpoint
UM_FILESYSTEM   - filesystem type
UM_MOUNTOPTIONS - mount options that have been passed to the mount command
UM_VENDOR       - vendor of the device (empty if unknown)
UM_MODEL        - model name of the device (empty if unknown)

Likewise, the command 'run-parts /etc/usbmount/umount.d' is executed
after a device or partition has been unmounted. The scripts can make use
of the environment variables UM_DEVICE, UM_MOUNTPOINT and UM_FILESYSTEM.
Note that vendor and model name are no longer easily available when the
device has been removed. If you need this information in an unmount hook
script, write it to a file in a mount hook script and read it back in
the unmount hook script.