Mail archive

[alpine-devel] Auto(un)mount on an mdev-based multi-user system

From: Walter Dnes <>
Date: Sun, 22 Jul 2012 21:58:57 -0400

Hi all;

  I've put together a few scripts that hook into mdev, and enable
automounting and unmounting of USB devices. There are examples on the
net of doing this for embedded devices, with one user, namely root.
Making it viable for a multi-user system, without selling out security,
was a challenge. E.g. one should really unmount manually before
removing a device that's been written, and I've provided a script for
that. It has been working for me for several weeks. The instructions
are at It'll remain
flagged as a "Work in progress" until I get more feedback.

  I'm running this on a Gentoo system, modified to run mdev, but the
scripts should be portable to any mdev-based sysytem. I use
"#!/bin/busybox ash" to run the scripts. I assume under Alpine it's
probably a direct call to ash. Please let me know if there is any
Gentoo-specific stuff, beyond the links to package sources.

Walter Dnes <>
Received on Sun Jul 22 2012 - 21:58:57 UTC