disk auto-mounter
Project homepage: http://www.bsdua.org/hotplug-diskmount.html
Description
hotplug-diskmount is a plugin for OpenBSD's hotplugd(8) that
automatically mounts removable disks. It works with any disk type
(USB mass storage devices, card readers and CD/DVD drives) and it
is intended to be used in single-user environments like desktops
or laptops.
Package information
- Ports path
- sysutils/hotplug-diskmount
- Package architecture
- amd64
- Maintainer
- Alexey Vatchenko <av@bsdua.org>
- Categories
- sysutils
- Available flavors
- None listed
Ports list build and test dependencies as well as runtime dependencies. pkg_add selects those needed for installation.
Direct dependencies
Runtime
OpenBSD README
This README contains unresolved ports variables; replace them before using its commands.
+-----------------------------------------------------------------------
| Running hotplug-diskmount on OpenBSD
+-----------------------------------------------------------------------
The hotplug-diskmount command is invoked by the hotplugd(8) daemon
from its attach script and terminates when the device is detached.
Before using it for the first time, create the directory where all
mountpoints will be placed:
# ${TRUEPREFIX}/libexec/hotplug-diskmount init
Enable hotplugd at boot time:
# echo hotplugd_flags= >> /etc/rc.conf.local
Edit the /etc/hotplug/attach script (remember to set the executable
bit, if needed):
#!/bin/sh
DEVCLASS=${1}
DEVNAME=${2}
LOGIN=joeuser
case ${DEVCLASS} in
2)
${TRUEPREFIX}/libexec/hotplug-diskmount attach -u ${LOGIN} -m 700 ${DEVNAME}
;;
esac
When a new device is inserted into the system, filesystems from
this device will be automatically mounted under /vol/DRIVE_NAME.
hotplug-diskmount will mount as many partitions as disk contains.