login
Login
/
Register
Search
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
openbsd-misc
»
2008
»
January
»
29
Re: hotplugd(8) mount flash drive
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From:
Heinrich Rebehn <rebehn@...>
To: Chris <atstake@...>
Cc: OpenBSD Misc <misc@...>
Subject:
Re: hotplugd(8) mount flash drive
Date: Tuesday, January 29, 2008 - 6:35 am
Chris wrote:
quoted text
> On Jan 29, 2008 12:24 AM, Chris wrote:
>> 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=
>> DEVNAME=
>>
>> case $DEVCLASS in
>> 2)
>> # disk devices
>>
>> disklabel=`/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
>>
>> ;;
>> esac
>>
>> I can mount the flash drive fine with mount /dev/sd1i /mnt/flash
>>
>> Any help would be much appreciated. Thanks.
>
> I figured (from /var/log/messages) that the flash drive is mounted as
> "JetFlash" so I changed the script to reflect this and still no luck.
> Following the /var/log/message after the flash drive is plugged in and
> also the new modified script.
>
> Jan 29 19:40:44 red /bsd: sd1 detached
> Jan 29 19:40:44 red /bsd: scsibus2 detached
> Jan 29 19:40:44 red /bsd: umass0 detached
> Jan 29 19:40:47 red /bsd: umass0 at uhub0 port 2 configuration 1 interface 0
> Jan 29 19:40:47 red /bsd:
> Jan 29 19:40:47 red /bsd: umass0: JetFlash Mass Storage Device, rev
> 2.00/1.41, addr 2
> Jan 29 19:40:47 red /bsd: umass0: using SCSI over Bulk-Only
> Jan 29 19:40:47 red /bsd: scsibus2 at umass0: 2 targets
> Jan 29 19:40:47 red /bsd: sd1 at scsibus2 targ 1 lun 0: TS8GJFV30, 8.07> SCSI2 0/direct removable
> Jan 29 19:40:47 red /bsd: sd1: 7799MB, 994 cyl, 255 head, 63 sec, 512
> bytes/sec, 15974398 sec total
>
> #!/bin/sh
#
# Maybe some debugging will help:
#
exec >> /tmp/logfile 2>&1
set -x
#
quoted text
>
> DEVCLASS=
> DEVNAME=
>
> case $DEVCLASS in
> 2)
> # disk devices
>
> disklabel=`/sbin/disklabel $DEVNAME 2>&1 | \
> sed -n '/^label: /s/^label: //p'`
> case $disklabel in
> JetFlash)
> # flash drive
> mount /dev/"$DEVNAME"i /mnt/flash
> ;;
> esac
> ;;
> 3)
> # network devices
>
> /sbin/dhclient $DEVNAME
>
> ;;
> esac
>
> Is there anything I am doing wrong? Thanks for any help.
>
-Heinrich
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
hotplugd(8) mount flash drive
, Chris
, (Tue Jan 29, 4:24 am)
Re: hotplugd(8) mount flash drive
, Chris
, (Tue Jan 29, 6:01 am)
Re: hotplugd(8) mount flash drive
, Heinrich Rebehn
, (Tue Jan 29, 6:35 am)
Re: hotplugd(8) mount flash drive
, Chris
, (Fri Feb 1, 2:40 am)
Re: hotplugd(8) mount flash drive
, Johan Fredin
, (Fri Feb 1, 7:30 am)
Re: hotplugd(8) mount flash drive
, frantisek holop
, (Fri Feb 1, 7:19 am)
Re: hotplugd(8) mount flash drive
, Chris
, (Fri Feb 1, 7:43 am)
Re: hotplugd(8) mount flash drive
, Johan Fredin
, (Tue Jan 29, 6:26 am)
Re: hotplugd(8) mount flash drive
, frantisek holop
, (Tue Jan 29, 11:35 am)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Greg Kroah-Hartman
[PATCH 005/196] Chinese: add translation of SubmittingDrivers
david
Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3
Andrew Morton
Re: PROBLEM: high load average when idle
Karl Meyer
PROBLEM: 2.6.23-rc "NETDEV WATCHDOG: eth0: transmit timed out"
git
:
linux-netdev
:
Evgeniy Polyakov
Mark IPW2100 as BROKEN: Fatal interrupt. Scheduling firmware restart.
Jarek Poplawski
Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock().
Gerrit Renker
[PATCH 28/37] dccp: Integration of dynamic feature activation - part 3 (client side)
David Miller
[GIT]: Networking
openbsd-misc
:
Colocation donated by:
Who's online
There are currently
5 users
and
817 guests
online.
Online users
pimerchant
ZBeyer
shirtsformenpv
itjobsqmzsrwah
dogenemasswcxwi
Syndicate