Home

The sysutils/hotplug-diskmount port

hotplug-diskmount-1.0.2p0 – disk auto-mounter (cvsweb github mirror)

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.
WWW: http://www.bsdua.org/hotplug-diskmount.html

Readme

+-----------------------------------------------------------------------
| Running ${PKGSTEM} 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.

Maintainer

Alexey Vatchenko

Categories

sysutils

Run dependencies

Files

Search