ajacoutot 9d087a11f1 Tweak documentation according to recent rc changes. 10 年之前
..
DESCR 2ffa1c87e2 Import hotplug-diskmount, a disk auto-mounter helper for the 13 年之前
PLIST d1968f6594 Update to hotplug-diskmount-0.7 13 年之前
README 9d087a11f1 Tweak documentation according to recent rc changes. 10 年之前

README

$OpenBSD: README,v 1.3 2014/07/22 10:55:41 ajacoutot Exp $

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