On 08 Jan 2014, at 07:36, Hugo Pompougnac <[email protected]> wrote:
> Good morning,
>
> Before all, please forgive my language, I'm french.
>
> As a
> student, I'm discovering OpenBSD. I'm trying to automount USB keys with
> hotplug,
> but it's quite difficult. That's why I ask to you.
>
>
> To recap :
> - I
> downloaded hotplug-diskmount
> - I created the directory /vol with
> /usr/local/libexec/hotplug-diskmount init
> - I added hotplug to rc.conf with
> echo "hotplugd_flags=\"\"" >> /etc/rc.conf.local
> - I created
> /etc/hotplug/attach following the manual :
>
> DEVCLASS=${1}
> DEVNAME=${2}
> LOGIN=joeuser
> case ${DEVCLASS} in
> 2)
>
> /usr/local/libexec/hotplug-diskmount attach -u ${LOGIN} -m 700 ${DEVNAME}
> ;;
> esac
>
> - I launched the daemon with
>
> /etc/rc.d/hotplugd start
> However, when I insert an USB stick (FAT16 or FAT32), hotplug doesn't mount
> them and /vol/ is empty. Nevertheless I can see them with "dmesg", and I can
> mount them with "mount".
>
>
> My /var/log/daemon says that :
>
> Jan 8 07:54:47
> home hotplugd[32702]: sd0 attached, class 2
> Jan 8 07:54:47 home
> hotplugd[32702]: scsibus3 attached, class 0
> Jan 8 07:54:47 home
> hotplugd[32702]: umass0 attached, class 0
> Jan 8 07:54:47 home
> hotplugd[32702]: child exit status: 1
> The last line may be important, but I
> don't undersand it ; that's why I ask you. You may know what the problem is ?
> Gratefully,
> Hugo P.
>
Doesn’t work on FAT disks for me neither. And I had to tweak
/etc/hotplug/attach to avoid (re-)mounting the crypto volumes my (fully)
encrypted disk is made of.
Joel Carnat has a different approach to this (see
http://www.tumfatig.net/20110903/automount-usb-stick-on-openbsd/) but I
haven’t looked at it yet, nor do I know if it still applies cleanly,
since the post is more than two years old.