I am trying to use hotplugd(8) to mount my USB flash drive (/dev/sd1i)
automatically in /mn/flash when I plug it it. I enabled hotplugd in
/etc/rc.conf.local and wrote the following script (chmod +x bit set)#!/bin/sh
DEVCLASS=$1
DEVNAME=$2case $DEVCLASS in
2)
# disk devicesdisklabel=`/sbin/disklabel $DEVNAME 2>&1 | \
sed -n '/^label: /s/^label: //p'`
case $disklabel in
flash)
# flash drive
mount /dev/"$DEVNAME"i /mnt/flash
;;
esac
;;
3)
# network devices/sbin/dhclient $DEVNAME
;;
esacI can mount the flash drive fine with mount /dev/sd1i /mnt/flash
Any help would be much appreciated. Thanks.
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
| Hiten Pandya | Re: up? (emacs docbook xml ide) |
| Andy Whitcroft | clam |
| Kamalesh Babulal | Re: 2.6.23-rc6-mm1 |
git: | |
| Stephen Hemminger | Re: iptables very slow after commit 784544739a25c30637397ace5489eeb6e15d7d49 |
| David Miller | [GIT]: Networking |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
