Re: running a user-defined script with hotplug

2002-05-29 Thread Yedidyah Bar-David

Hi,

On Wed, May 29, 2002 at 01:48:43PM +0300, Dan Kenigsberg wrote:
> Hi List,
> 
> I have RH73 that uses hotplug to monitor the usb and load modules when needed,
> and it works fine.
> 
> However, I would like to run a script whenever I insert my DiskOnKey to the usb
> socket, and another one (well, it could be the smae one but with another arg)
> when I unplug it.
> 
> man hotplug and google did not tell me the answer to my simple question.

Even though Debian also has hotplug, I found it much easier to use a
package called usbmgr. I don't know if RH has it, but even if it
doesn't, I suggest to look at it.
I can share my conf, if anyone is interested.

> 
> Please don't suggest to rewrite /etc/hostplug/usb.agent. This is not what I'm
> looking for.
> 
> Dan.
> 
> =
> To unsubscribe, send mail to [EMAIL PROTECTED] with
> the word "unsubscribe" in the message body, e.g., run the command
> echo unsubscribe | mail [EMAIL PROTECTED]

Didi


=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]




Re: running a user-defined script with hotplug

2002-05-29 Thread Ehud Karni

On Wed, 29 May 2002 13:48:43 +0300 (IDT), Dan Kenigsberg <[EMAIL PROTECTED]> 
wrote:
> 
> However, I would like to run a script whenever I insert my DiskOnKey to the usb
> socket, and another one (well, it could be the smae one but with another arg)
> when I unplug it.

Why don't you add a simple test like [ -s  ] or [ -d  ]
for a file or dir that are exist on this DiskOnKey, then you know if
it is plugged (file/dir exist) or unplugged (does not).

Ehud.


-- 
 Ehud Karni   Tel: +972-3-7966-561  /"\
 Mivtach - Simon  Fax: +972-3-7966-667  \ /  ASCII Ribbon Campaign
 Insurance agencies   (USA) voice mail and   X   Against   HTML   Mail
 http://www.mvs.co.il  FAX:  1-815-5509341  / \
 mailto:[EMAIL PROTECTED]  Better  Safe  Than  Sorry

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]




running a user-defined script with hotplug

2002-05-29 Thread Dan Kenigsberg

Hi List,

I have RH73 that uses hotplug to monitor the usb and load modules when needed,
and it works fine.

However, I would like to run a script whenever I insert my DiskOnKey to the usb
socket, and another one (well, it could be the smae one but with another arg)
when I unplug it.

man hotplug and google did not tell me the answer to my simple question.

Please don't suggest to rewrite /etc/hostplug/usb.agent. This is not what I'm
looking for.

Dan.

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]