Import hotplug-diskmount, a disk auto-mounter helper for the

hotplugd(8) daemon.

From its author (and maintainer) Alexey Vatchenko <av@bsdua.org>
with tweaks by me.

OK landry@
This commit is contained in:
dcoppa 2011-06-27 10:06:56 +00:00
parent 2bc3920ffc
commit 2ffa1c87e2
5 changed files with 83 additions and 0 deletions

View File

@ -0,0 +1,27 @@
# $OpenBSD: Makefile,v 1.1.1.1 2011/06/27 10:06:56 dcoppa Exp $
COMMENT = disk auto-mounter
DISTNAME = hotplug-diskmount-0.5
CATEGORIES = sysutils
MAINTAINER = Alexey Vatchenko <av@bsdua.org>
HOMEPAGE = http://www.bsdua.org/hotplug-diskmount.html
MASTER_SITES = http://www.bsdua.org/files/
# Public domain
PERMIT_PACKAGE_CDROM = Yes
PERMIT_PACKAGE_FTP = Yes
PERMIT_DISTFILES_CDROM =Yes
PERMIT_DISTFILES_FTP = Yes
WANTLIB = c
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/hotplug-diskmount ${PREFIX}/libexec/
${INSTALL_MAN} ${WRKSRC}/hotplug-diskmount.1 ${PREFIX}/man/man1/
.include <bsd.port.mk>

View File

@ -0,0 +1,5 @@
MD5 (hotplug-diskmount-0.5.tar.gz) = YFYIA9ZiFs46ePutYn1EEQ==
RMD160 (hotplug-diskmount-0.5.tar.gz) = J8A8S4GaYAKzZlRFvs3hI6ax6eA=
SHA1 (hotplug-diskmount-0.5.tar.gz) = foN6ex1fArE8Yxns7ATqy878joc=
SHA256 (hotplug-diskmount-0.5.tar.gz) = Z6zQZJ63V+Ov58yF905HPZoOcE+1kiVwlXpH1LPi230=
SIZE (hotplug-diskmount-0.5.tar.gz) = 5039

View File

@ -0,0 +1,5 @@
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.

View File

@ -0,0 +1,4 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2011/06/27 10:06:56 dcoppa Exp $
libexec/hotplug-diskmount
@man man/man1/hotplug-diskmount.1
share/doc/pkg-readmes/${FULLPKGNAME}

View File

@ -0,0 +1,42 @@
$OpenBSD: README,v 1.1.1.1 2011/06/27 10:06:56 dcoppa 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:
# /usr/local/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)
/usr/local/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.