linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrey Borzenkov <arvidjaar@mail.ru>
To: linux-hotplug@vger.kernel.org
Subject: Re: How to find mounted path from usb hotplug?
Date: Thu, 17 May 2007 02:48:52 +0000	[thread overview]
Message-ID: <200705170648.58159.arvidjaar@mail.ru> (raw)
In-Reply-To: <E7DF58FF-F8B1-4364-984C-69FE24F941E4@kinostudios.com>


[-- Attachment #1.1: Type: text/plain, Size: 1709 bytes --]

On Thursday 17 May 2007, Greg wrote:
> How can I find out where my USB stick was mounted using /sbin/
> hotplug?  I have a simple script in /etc/hotplug.d/usb/ that is run
> when the key is attached, but I need to know the full path of where
> the USB key is mounted to, and I can't seem to figure out how the
> environment variables can tell me that:
>

Because at this stage it is not known yet. What makes you believe it will be 
mounted at all?

Once upon a time there were mount/umount events but I believe they are gone 
now.

To not depend on the method of mounting just poll /proc/mounts. If you are 
sure your system is using HAL to mount, you can just watch for 
PropertyChanged for correspsonding device (and check mounted state).

HTH

-andrey

> SUBSYSTEM=usb
> DEVPATH=/devices/pci0000:00/0000:00:10.4/usb1/1-5/1-5:1.0
> PATH=/sbin:/bin:/usr/sbin:/usr/bin
> ACTION=add
> MODALIAS=usb:v0457p0150d0100dc00dsc00dp00ic08isc06ip50
> PWD=/
> HOME=/
> SHLVL=2
> DEVICE=/proc/bus/usb/001/004
> INTERFACE=8/6/80
> PRODUCT=457/150/100
> TYPE=0/0/0
> PHYSDEVBUS=usb
>
> Any help would be greatly appreciated!
>
> - Greg
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
> Linux-hotplug-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel



[-- Attachment #1.2: Type: application/pgp-signature, Size: 189 bytes --]

[-- Attachment #2: Type: text/plain, Size: 286 bytes --]

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

[-- Attachment #3: Type: text/plain, Size: 226 bytes --]

_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

  reply	other threads:[~2007-05-17  2:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-16 23:20 How to find mounted path from usb hotplug? Greg
2007-05-17  2:48 ` Andrey Borzenkov [this message]
2007-05-17  4:23 ` Greg
2007-05-17 11:07 ` Bryan Kadzban

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200705170648.58159.arvidjaar@mail.ru \
    --to=arvidjaar@mail.ru \
    --cc=linux-hotplug@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).