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.
# /usr/local/libexec/hotplug-diskmount init
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 _LOGIN_ -m 700 "$DEVNAME" ;; esac
$ mount /dev/sd0i on /vol/CANON_SD32 type msdos (local, nodev, nosuid) /dev/cd0a on /vol/5.0 Install CD type cd9660 (local, nodev, ... $ ls /vol 5.0 Install CD CANON_SD32
Download:
Public Mercurial Repository:
$ hg clone https://bitbucket.org/alex_vatchenko/hotplug-diskmount
Copyright © 2006-2016, Alexey Vatchenko. All rights reserved.
Designed by Vladimir Mostovoy.