Hi,
I want to write a program (a shell script maybe) to do something
whenever a usb donkey is plugged into the slot. There is a vfat
filesystem and some files on the usb. Would you please tell me how
to? Thanks.
Printable View
Hi,
I want to write a program (a shell script maybe) to do something
whenever a usb donkey is plugged into the slot. There is a vfat
filesystem and some files on the usb. Would you please tell me how
to? Thanks.
Hi,
I had the same question myself and solved by installing ivman. I start
ivman from wm's initialization scripts and I configured it to run my
usb scripts whenever a block device appears in my system as /dev/sdc.
Probably you can make it more general.
HTH
On Aug 5, 6:54 pm, iulian.t...@gmail.com wrote:[color=blue]
> Hi,
> I had the same question myself and solved by installing ivman. I start
> ivman from wm's initialization scripts and I configured it to run my
> usb scripts whenever a block device appears in my system as /dev/sdc.
> Probably you can make it more general.
> HTH[/color]
Thank you! I will check out ivman. Hope it is a console program since
the box does not have X.
On 2008-08-06, Steven Woody <narkewoody@gmail.com> wrote:[color=blue]
> On Aug 5, 6:54 pm, iulian.t...@gmail.com wrote:[color=green]
>> Hi,
>> I had the same question myself and solved by installing ivman. I start
>> ivman from wm's initialization scripts and I configured it to run my
>> usb scripts whenever a block device appears in my system as /dev/sdc.
>> Probably you can make it more general.
>> HTH[/color]
>
> Thank you! I will check out ivman. Hope it is a console program since
> the box does not have X.[/color]
Or you could look into udev. Besides creating symlinks for your devices
it can execute programs and scripts.
Your machine already comes with udev, so you don't need to install extra
packages.
On Aug 7, 4:46 am, Blikje Ham <blikje...@vierkleurenspreeuw.nl> wrote:[color=blue]
> On 2008-08-06, Steven Woody <narkewo...@gmail.com> wrote:
>[color=green]
> > On Aug 5, 6:54 pm, iulian.t...@gmail.com wrote:[color=darkred]
> >> Hi,
> >> I had the same question myself and solved by installing ivman. I start
> >> ivman from wm's initialization scripts and I configured it to run my
> >> usb scripts whenever a block device appears in my system as /dev/sdc.
> >> Probably you can make it more general.
> >> HTH[/color][/color]
>[color=green]
> > Thank you! I will check out ivman. Hope it is a console program since
> > the box does not have X.[/color]
>
> Or you could look into udev. Besides creating symlinks for your devices
> it can execute programs and scripts.
> Your machine already comes with udev, so you don't need to install extra
> packages.[/color]
Yes, my slack already has udev. But I don't have experience on it.
Will it create a /dev/sd[a-z] file when a usb donkey plug in? Thanks.
On 2008-08-07, Steven Woody <narkewoody@gmail.com> wrote:[color=blue]
> On Aug 7, 4:46 am, Blikje Ham <blikje...@vierkleurenspreeuw.nl> wrote:[color=green]
>> On 2008-08-06, Steven Woody <narkewo...@gmail.com> wrote:
>>
>> Or you could look into udev. Besides creating symlinks for your devices
>> it can execute programs and scripts.
>> Your machine already comes with udev, so you don't need to install extra
>> packages.[/color]
>
> Yes, my slack already has udev. But I don't have experience on it.
> Will it create a /dev/sd[a-z] file when a usb donkey plug in? Thanks.[/color]
You can configure it to do a whole lot of stuff. Look into the man-page,
and on the internet, is my advise. I'm no udev expert.
You can configure udev to create a symlink (like /dev/sd[a-z]), run programs.
From the manpage:[color=blue]
>RUN
> Add a program to the list of programs to be executed for a specific
> device. This can only be used for very short running tasks. Running
> an event process for a long period of time may block all further
> events for this or a dependent device. Long running tasks need to
> be immediately detached from the event process itself.[/color]
Good luck!
On Wed, 6 Aug 2008 22:49:27 -0700 (PDT)
Steven Woody <narkewoody@gmail.com> wrote:[color=blue]
> Yes, my slack already has udev. But I don't have experience on it.
> Will it create a /dev/sd[a-z] file when a usb donkey plug in? Thanks.[/color]
If by a "USB donkey" you mean a flash drive, then the standard udev
rules which come with the udev package would normally recognise it and
give it a device file of the form /dev/sd[a-z][0-9]. Are you sure that
one doesn't already exist?
If not, then writing your own rule for the device is relatively trivial
- see [url]http://reactivated.net/writing_udev_rules.html[/url] . I have rules,
for example, for my ipod and my samsung mobile phone which set up a
device symlink in /dev for them, so that I can listen to the ipod or
establish an internet connection with my mobile. I have another rule
for my USB wireless stick, which will automatically cause wicd to link
with relevant networks in range when I plug it in.
Chris
On Thu, 07 Aug 2008 10:15:23 +0100, Chris Vine wrote:
[color=blue][color=green]
>> Yes, my slack already has udev. But I don't have experience on it. Will
>> it create a /dev/sd[a-z] file when a usb donkey plug in? Thanks.[/color]
>
> If by a "USB donkey" you mean a flash drive,[/color]
Possibly. The usual search engines do not clarify the issue.
Mark Madsen wrote:[color=blue]
> On Thu, 07 Aug 2008 10:15:23 +0100, Chris Vine wrote:
>[color=green][color=darkred]
>>> Yes, my slack already has udev. But I don't have experience on it. Will
>>> it create a /dev/sd[a-z] file when a usb donkey plug in? Thanks.[/color]
>>
>> If by a "USB donkey" you mean a flash drive,[/color]
>
> Possibly. The usual search engines do not clarify the issue.[/color]
i suspect the OP meant 'dongle'. that's actually how i read the word until
your message prompted me to look closer... ;-)
--
Joost Kremers [email]joostkremers@yahoo.com[/email]
Selbst in die Unterwelt dringt durch Spalten Licht
EN:SiS(9)
On Thu, 07 Aug 2008 09:45:41 +0000, Joost Kremers wrote:
[color=blue]
> Mark Madsen wrote:[color=green]
>> On Thu, 07 Aug 2008 10:15:23 +0100, Chris Vine wrote:
>>[color=darkred]
>>>> Yes, my slack already has udev. But I don't have experience on it.
>>>> Will it create a /dev/sd[a-z] file when a usb donkey plug in?
>>>> Thanks.
>>>
>>> If by a "USB donkey" you mean a flash drive,[/color]
>>
>> Possibly. The usual search engines do not clarify the issue.[/color]
>
> i suspect the OP meant 'dongle'. that's actually how i read the word
> until your message prompted me to look closer... ;-)[/color]
Well, if one mixes "dongle" and "key" one gets "donkey", and the image of
a beast of burden carting huge baskets full of data reluctantly around is
really quite evocative :-)
On Thu, 7 Aug 2008, Mark Madsen wrote:
[color=blue]
> On Thu, 07 Aug 2008 10:15:23 +0100, Chris Vine wrote:
>[color=green][color=darkred]
>>> Yes, my slack already has udev. But I don't have experience on it. Will
>>> it create a /dev/sd[a-z] file when a usb donkey plug in? Thanks.[/color]
>>
>> If by a "USB donkey" you mean a flash drive,[/color]
>
> Possibly. The usual search engines do not clarify the issue.
>[/color]
I sort of wondered if it was a mangling of "dongle". Of course the
word's meaning gets mangled in the first place. "When I was a kid", not
really, it meant a little bit of hardware to allow the use of software;
if the dongle wasn't in place it wouldn't run, hence it helped to
ensure only legit copies of the software were out there.
But then I keep seeing people recently use the word for small
things sticking off some connector on the back, so I guess a
USB flash drive would fit that.
Michael