Re: faq/faq14.html

"Dmitri A. Alenitchev" <[email protected]>
Newsgroups gmane.os.openbsd.www
Message-ID <[email protected]>
Here is another patch.

  - Added example script (Ray Lai's remark).

Index: faq/faq14.html
===================================================================
RCS file: /cvs/www/faq/faq14.html,v
retrieving revision 1.155
diff -u -r1.155 faq14.html
--- faq/faq14.html	4 Mar 2006 04:12:47 -0000	1.155
+++ faq/faq14.html	30 Mar 2006 10:00:16 -0000
@@ -2152,6 +2152,36 @@
 umass0 detached
 </pre></blockquote>

+<h3>Automounting flash memory device with OpenBSD</h3>
+
+<p>
+Using hotplugd(8) usb flash memory device can be mounted after attachment.
+Sample <tt>/etc/hotplug/attach</tt> script for automounting flash memory
+device:
+
+<blockquote><pre>
+#!/bin/sh
+
+DEVCLASS=$1
+DEVNAME=$2
+
+case $DEVCLASS in
+2)
+	disklabel=`/sbin/disklabel $DEVNAME | grep '^label:' | \
+	    sed -e 's/^label: //'`
+	case $disklabel in
+	USB*FLASH*)
+		mount -o nodev,nosuid /dev/"$DEVNAME"i /mnt/flashmem
+		;;
+	esac
+
+	;;
+esac
+</pre></blockquote>
+
+<p>
+For more information see the hotplugd(8).
+
 <p>
 <a name= "DiskOpt"></a>
 <h2>14.18 - Optimizing disk performance</h2>

--
Dmitri A. Alenitchev <[email protected]>
System Administrator, Digital Worlds J.S.C.
ALENITCHEV-RIPN
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.