Can I and should I use Upstart to call script when USB drive is inserted?

Asked by John on 2009-03-03

Hi,

I might be confused about what I should use Upstart for.

I want to run a script when a specific USB HDD-drive is inserted.

1. Can I run a script just when this specific USB HDD-drive is inserted?
2. Can I run a script when any HDD-drive is inserted? Can this script get the GUID of the USB-drive as an argument?

I've asked on Stack Overflow: http://stackoverflow.com/questions/589841/upstart-calling-script-for-inserted-usb-drive

And I got one answer (only) recommending me to use udev or dbus as Upstart wouldn't be able to send this signal (for a USB-drive which has been inserted).

Best regards, Kent

Question information

Language:
English Edit question
Status:
Answered
For:
upstart Edit question
Assignee:
No assignee Edit question
Last query:
2009-03-03
Last reply:
2009-03-08

On Tue, 2009-03-03 at 18:11 +0000, Kent wrote:

> I might be confused about what I should use Upstart for.
>
> I want to run a script when a specific USB HDD-drive is inserted.
>
> 1. Can I run a script just when this specific USB HDD-drive is
> inserted?
> 2. Can I run a script when any HDD-drive is inserted? Can this script
> get the GUID of the USB-drive as an argument?
>
> I've asked on Stack Overflow:
> http://stackoverflow.com/questions/589841/upstart-calling-script-for-inserted-usb-drive
>
> And I got one answer (only) recommending me to use udev or dbus as
> Upstart wouldn't be able to send this signal (for a USB-drive which
> has been inserted).
>
You're almost certainly better off doing this as a udev rule.

Scott
--
Scott James Remnant
<email address hidden>

Can you help with this problem?

Provide an answer of your own, or ask John for more information if necessary.

To post a message you must log in.