Skip to content

Latest commit

 

History

History
75 lines (45 loc) · 1.77 KB

README.md

File metadata and controls

75 lines (45 loc) · 1.77 KB

amount(1)

NAME

amount - serial-disk auto-mounter

SYNOPSIS

amount [OPTIONS] DEVICE [MOUNTDIR=/media/] [-- MOUNT_OPTIONS]

DESCRIPTION

Auto-mount serial-disk under /media.

If MOUNTDIR is left unspecified, amount(1) uses /media/LABEL. It falls back to /media/DEVNAME if DEVICE has no LABEL or if FS does not support for labels.

If DEVICE is already mounted, amount(1) exits success and reports a warning onto stderr.

If MOUNTDIR already exists, amount(1) suffixes it by _num where num is the next mount-point available.

When DEVICE is mounted amount(1) outputs the mount-point onto stdout and runs helpers under /usr/share/amount.d/ using mount as first argument and DEVNAME as second.

OPTIONS

-h or --help Display this message.

-v or --version Display the version.

EXAMPLES

In its simpliest form, here is an example to mount device /dev/sdb1

# amount /dev/sdb1
/media/data

The device is mounted under its LABEL (i.e. data). In the case of the FS has no label, the mount-point would have been its DEVNAME (i.e. sdb1).

The mount-point can be specified as second argument

# amount /dev/sdb1 /mnt
/mnt

Extra arguments can be passed to mount(1) after the --

# amount /dev/sdb1 /mnt/data-ro -- -oro
/mnt/data-ro

SAMPLES FILES

/etc/udev/rules.d/55-sd.rules - udev rule for sd devices

/usr/share/udev/sd.action - udev run script for sd devices

/usr/share/amount.d/notify - notify helper

AUTHOR

Written by Gaël PORTAY gael.portay@gmail.com

COPYRIGHT

Copyright (c) 2016-2017 Gaël PORTAY

This program is free software: you can redistribute it and/or modify it under the terms of the MIT License.