Hotplug-diskmount is a plug-in to OpenBSD's hotplugd that automatically mounts removable disks to the filesystem. It works with any disk types (SD cards, USB mass storage devices, card readers and CD/DVD drives). This program is indended to be used in single user environment on desktop or laptop.
First of all, create directory where all mountpoints will be placed. Pay attention, that .db directory must be secured.
# mkdir /vol # mkdir /vol/.db # chmod 700 /vol/.db
Enable hotplugd at boot time.
# echo "hotplugd_flags=\"\"" >> /etc/rc.conf.local
Add missing parts to your /etc/hotplug/attach. Remember to set executable bit to attach script if you are creating new one.
#!/bin/sh
DEVCLASS=$1
DEVNAME=$2
case $DEVCLASS in
2)
/usr/local/libexec/hotplug-diskmount attach -u av -m 700 "$DEVNAME"
;;
esac
$ mount /dev/sd0i on /vol/CANON_SD32 type msdos (local, nodev, nosuid) /dev/cd0a on /vol/4.7 Install CD type cd9660 (local, nodev, ... $ ls /vol 4.7 Install CD CANON_SD32
Download:
Copyright © 2006-2010, Alexey Vatchenko. All rights reserved.
Designed by Vladimir Mostovoy.