linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Run script when USB scanner unplugged
@ 2004-06-02 20:28 Ian Pilcher
  2004-06-03  8:34 ` Harald Hoyer
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: Ian Pilcher @ 2004-06-02 20:28 UTC (permalink / raw)
  To: linux-hotplug

Running Fedora Core 2 here.  I've found that the hotplug scripts shipped
with the distribution do a fine job of setting the permissions when a
USB scanner is plugged in *after* a user has logged in.  Unfortunately,
this is not the most common usage scenario; I leave my scanner plugged
in pretty much all the time, and I suspect that most other users do the
same.

What's needed, at least on Red Hat/Fedora Core systems, is a symlink
which will tell PAM to adjust the permissions when a "console" user logs
in.  I've hacked /etc/hotplug/usb/libusbscanner to do the following when
a scanner is plugged in:

     DEVID="${REMOVER#/var/run/usb/}"
     rm -f "/dev/usb/scanner-${DEVID}"
     ln -s "${DEVICE}" "/dev/usb/scanner-${DEVID}"

So far so good.  The link is created when the system boots, and PAM
follows it and sets the device permissions properly when a "console
user" logs in.

Now I want to remove the link when (if) the scanner is unplugged.  I've
tried adding an 'if [ "${ACTION}" = "remove ]' section to
/etc/hotplug/usb/libusbscanner, but that script doesn't appear to get
executed when a USB scanner is unplugged.

What do I need to do?

Thanks!

-- 
====================================
Ian Pilcher                                        i.pilcher@comcast.net
====================================



-------------------------------------------------------
This SF.Net email is sponsored by the new InstallShield X.
From Windows to Linux, servers to mobile, InstallShield X is the one
installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504
_______________________________________________
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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Run script when USB scanner unplugged
  2004-06-02 20:28 Run script when USB scanner unplugged Ian Pilcher
@ 2004-06-03  8:34 ` Harald Hoyer
  2004-06-03 17:36 ` Ian Pilcher
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Harald Hoyer @ 2004-06-03  8:34 UTC (permalink / raw)
  To: linux-hotplug

[-- Attachment #1: Type: text/plain, Size: 1406 bytes --]

Ian Pilcher wrote:
> Running Fedora Core 2 here.  I've found that the hotplug scripts shipped
> with the distribution do a fine job of setting the permissions when a
> USB scanner is plugged in *after* a user has logged in.  Unfortunately,
> this is not the most common usage scenario; I leave my scanner plugged
> in pretty much all the time, and I suspect that most other users do the
> same.
> 
> What's needed, at least on Red Hat/Fedora Core systems, is a symlink
> which will tell PAM to adjust the permissions when a "console" user logs
> in.  I've hacked /etc/hotplug/usb/libusbscanner to do the following when
> a scanner is plugged in:
> 
>     DEVID="${REMOVER#/var/run/usb/}"
>     rm -f "/dev/usb/scanner-${DEVID}"
>     ln -s "${DEVICE}" "/dev/usb/scanner-${DEVID}"
> 
> So far so good.  The link is created when the system boots, and PAM
> follows it and sets the device permissions properly when a "console
> user" logs in.
> 
> Now I want to remove the link when (if) the scanner is unplugged.  I've
> tried adding an 'if [ "${ACTION}" = "remove ]' section to
> /etc/hotplug/usb/libusbscanner, but that script doesn't appear to get
> executed when a USB scanner is unplugged.
> 
> What do I need to do?
> 
> Thanks!
> 

Install the FC2 udev rpm... read the manpage and add a *.rule file to 
/etc/udev/rules.d . Also add your scanner to /etc/security/console.perms 
(man 5 console.perms).


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 252 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Run script when USB scanner unplugged
  2004-06-02 20:28 Run script when USB scanner unplugged Ian Pilcher
  2004-06-03  8:34 ` Harald Hoyer
@ 2004-06-03 17:36 ` Ian Pilcher
  2004-06-04 13:55 ` Ian Pilcher
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Ian Pilcher @ 2004-06-03 17:36 UTC (permalink / raw)
  To: linux-hotplug

Harald Hoyer wrote:
> Install the FC2 udev rpm... read the manpage and add a *.rule file to 
> /etc/udev/rules.d . Also add your scanner to /etc/security/console.perms 
> (man 5 console.perms).

OK, I've installed the udev RPM and added the following line to
/etc/udev/rules.d/50-udev.rules:

     BUS="usb", SYSFS{idVendor}="04b8", SYSFS{idProduct}="0110",
         NAME="usb/epson_scanner"

Here is the output of lsusb:

     Bus 002 Device 001: ID 0000:0000
     Bus 001 Device 003: ID 04e8:323a Samsung Electronics Co., Ltd
     Bus 001 Device 002: ID 04b8:0110 Seiko Epson Corp. Perfection 1650
     Bus 001 Device 001: ID 0000:0000

This seems like it should work, but the /udev/usb/epson_scanner node
never gets created.  (/udev/usb/lp0 is created.)  What could I be doing
wrong?

Thanks!

-- 
====================================
Ian Pilcher                                        i.pilcher@comcast.net
====================================


-------------------------------------------------------
This SF.Net email is sponsored by the new InstallShield X.
From Windows to Linux, servers to mobile, InstallShield X is the one
installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504
_______________________________________________
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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Run script when USB scanner unplugged
  2004-06-02 20:28 Run script when USB scanner unplugged Ian Pilcher
  2004-06-03  8:34 ` Harald Hoyer
  2004-06-03 17:36 ` Ian Pilcher
@ 2004-06-04 13:55 ` Ian Pilcher
  2004-06-04 17:07 ` Bertrik Sikken
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Ian Pilcher @ 2004-06-04 13:55 UTC (permalink / raw)
  To: linux-hotplug

Hard to believe that I've already stumped the entire hotplug development
community.  Since I don't see this in the archives, I'm resending it.
Sorry if it turns out to be a dupe.

Harald Hoyer wrote:
 > Install the FC2 udev rpm... read the manpage and add a *.rule file to
 > /etc/udev/rules.d . Also add your scanner to
 > /etc/security/console.perms (man 5 console.perms).


OK, I've installed the udev RPM and added the following line to
/etc/udev/rules.d/50-udev.rules:

     BUS="usb", SYSFS{idVendor}="04b8", SYSFS{idProduct}="0110",
         NAME="usb/epson_scanner"

Here is the output of lsusb:

     Bus 002 Device 001: ID 0000:0000
     Bus 001 Device 003: ID 04e8:323a Samsung Electronics Co., Ltd
     Bus 001 Device 002: ID 04b8:0110 Seiko Epson Corp. Perfection 1650
     Bus 001 Device 001: ID 0000:0000

This seems like it should work, but the /udev/usb/epson_scanner node
never gets created.  (/udev/usb/lp0 is created.)  What could I be doing
wrong?

Thanks!

-- 
====================================
Ian Pilcher                                        i.pilcher@comcast.net
====================================


-------------------------------------------------------
This SF.Net email is sponsored by the new InstallShield X.
From Windows to Linux, servers to mobile, InstallShield X is the one
installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504
_______________________________________________
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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Run script when USB scanner unplugged
  2004-06-02 20:28 Run script when USB scanner unplugged Ian Pilcher
                   ` (2 preceding siblings ...)
  2004-06-04 13:55 ` Ian Pilcher
@ 2004-06-04 17:07 ` Bertrik Sikken
  2004-06-04 21:13 ` Greg KH
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Bertrik Sikken @ 2004-06-04 17:07 UTC (permalink / raw)
  To: linux-hotplug

Ian Pilcher wrote:
> Hard to believe that I've already stumped the entire hotplug development
> community.  Since I don't see this in the archives, I'm resending it.
> Sorry if it turns out to be a dupe.
> 
> Harald Hoyer wrote:
>  > Install the FC2 udev rpm... read the manpage and add a *.rule file to
>  > /etc/udev/rules.d . Also add your scanner to
>  > /etc/security/console.perms (man 5 console.perms).
> 
> 
> OK, I've installed the udev RPM and added the following line to
> /etc/udev/rules.d/50-udev.rules:
> 
>     BUS="usb", SYSFS{idVendor}="04b8", SYSFS{idProduct}="0110",
>         NAME="usb/epson_scanner"
> 
> Here is the output of lsusb:
> 
>     Bus 002 Device 001: ID 0000:0000
>     Bus 001 Device 003: ID 04e8:323a Samsung Electronics Co., Ltd
>     Bus 001 Device 002: ID 04b8:0110 Seiko Epson Corp. Perfection 1650
>     Bus 001 Device 001: ID 0000:0000
> 
> This seems like it should work, but the /udev/usb/epson_scanner node
> never gets created.  (/udev/usb/lp0 is created.)  What could I be doing
> wrong?

FC2 uses a linux 2.6 kernel right?
Kernel 2.6 no longer has the scanner kernel module, so there's
no longer a device node associated with it (or am I
overlooking something here?).
Communication with an USB scanner under kernel 2.6 is done with
libusb instead (using the files in /proc/bus/usb).

Bertrik


-------------------------------------------------------
This SF.Net email is sponsored by the new InstallShield X.
From Windows to Linux, servers to mobile, InstallShield X is the one
installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504
_______________________________________________
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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Run script when USB scanner unplugged
  2004-06-02 20:28 Run script when USB scanner unplugged Ian Pilcher
                   ` (3 preceding siblings ...)
  2004-06-04 17:07 ` Bertrik Sikken
@ 2004-06-04 21:13 ` Greg KH
  2004-06-05 16:01 ` Ian Pilcher
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Greg KH @ 2004-06-04 21:13 UTC (permalink / raw)
  To: linux-hotplug

On Wed, Jun 02, 2004 at 03:28:00PM -0500, Ian Pilcher wrote:
> Running Fedora Core 2 here.  I've found that the hotplug scripts shipped
> with the distribution do a fine job of setting the permissions when a
> USB scanner is plugged in *after* a user has logged in.

There is no /dev node for a USB scanner anymore, as there is no kernel
driver for it in 2.6.  Do you realize this?  Because of this, modifying
the hotplug scripts will be quite difficult, and udev will know nothing
about this kind of device, sorry.

thanks,

greg k-h


-------------------------------------------------------
This SF.Net email is sponsored by the new InstallShield X.
From Windows to Linux, servers to mobile, InstallShield X is the one
installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504
_______________________________________________
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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Run script when USB scanner unplugged
  2004-06-02 20:28 Run script when USB scanner unplugged Ian Pilcher
                   ` (4 preceding siblings ...)
  2004-06-04 21:13 ` Greg KH
@ 2004-06-05 16:01 ` Ian Pilcher
  2004-06-05 16:05 ` Greg KH
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Ian Pilcher @ 2004-06-05 16:01 UTC (permalink / raw)
  To: linux-hotplug

Greg KH wrote:
> On Wed, Jun 02, 2004 at 03:28:00PM -0500, Ian Pilcher wrote:
> 
>>Running Fedora Core 2 here.  I've found that the hotplug scripts shipped
>>with the distribution do a fine job of setting the permissions when a
>>USB scanner is plugged in *after* a user has logged in.
> 
> 
> There is no /dev node for a USB scanner anymore, as there is no kernel
> driver for it in 2.6.  Do you realize this?  Because of this, modifying
> the hotplug scripts will be quite difficult, and udev will know nothing
> about this kind of device, sorry.
> 

/etc/hotplug/usb/libusbscanner, as shipped with Fedora Core 2, already
sets the ownership of the appropriate /proc/bus/usb/... file to the
"console" user.  This works fine when a scanner is plugged in *after*
the user has logged on.

I've hacked /etc/hotplug/usb/libusbscanner to create a symbolic link
from /dev/usb/scanner-%sys%devices%pci%... to that /proc/bus/usb...
file.  When the USB "insertion" is processed during system boot, the
symlink gets created.  Then when a "console" user logs on, PAM follows
the symlink and sets the ownership of the /proc/bus/usb... file
appropriately.

All I want to do is run a script during the USB "remove" event to get
rid of this symlink.  Reading through /etc/hotplug/usb.agent, it looks
like I should be able to put a script in the location specified by the
${REMOVER} variable, but I've tried this and it never gets executed.

What do I need to do?

-- 
====================================
Ian Pilcher                                        i.pilcher@comcast.net
====================================


-------------------------------------------------------
This SF.Net email is sponsored by the new InstallShield X.
From Windows to Linux, servers to mobile, InstallShield X is the one
installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504
_______________________________________________
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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Run script when USB scanner unplugged
  2004-06-02 20:28 Run script when USB scanner unplugged Ian Pilcher
                   ` (5 preceding siblings ...)
  2004-06-05 16:01 ` Ian Pilcher
@ 2004-06-05 16:05 ` Greg KH
  2004-06-05 17:35 ` Ian Pilcher
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Greg KH @ 2004-06-05 16:05 UTC (permalink / raw)
  To: linux-hotplug

On Sat, Jun 05, 2004 at 11:01:23AM -0500, Ian Pilcher wrote:
> Greg KH wrote:
> >On Wed, Jun 02, 2004 at 03:28:00PM -0500, Ian Pilcher wrote:
> >
> >>Running Fedora Core 2 here.  I've found that the hotplug scripts shipped
> >>with the distribution do a fine job of setting the permissions when a
> >>USB scanner is plugged in *after* a user has logged in.
> >
> >
> >There is no /dev node for a USB scanner anymore, as there is no kernel
> >driver for it in 2.6.  Do you realize this?  Because of this, modifying
> >the hotplug scripts will be quite difficult, and udev will know nothing
> >about this kind of device, sorry.
> >
> 
> /etc/hotplug/usb/libusbscanner, as shipped with Fedora Core 2, already
> sets the ownership of the appropriate /proc/bus/usb/... file to the
> "console" user.  This works fine when a scanner is plugged in *after*
> the user has logged on.
> 
> I've hacked /etc/hotplug/usb/libusbscanner to create a symbolic link
> from /dev/usb/scanner-%sys%devices%pci%... to that /proc/bus/usb...
> file.

Um, why?  That usbfs file is _not_ a device node.  Anyway...

> When the USB "insertion" is processed during system boot, the
> symlink gets created.  Then when a "console" user logs on, PAM follows
> the symlink and sets the ownership of the /proc/bus/usb... file
> appropriately.
> 
> All I want to do is run a script during the USB "remove" event to get
> rid of this symlink.  Reading through /etc/hotplug/usb.agent, it looks
> like I should be able to put a script in the location specified by the
> ${REMOVER} variable, but I've tried this and it never gets executed.
> 
> What do I need to do?

I don't know, sorry.  Never used the remove stuff myself...

Good luck,

greg k-h


-------------------------------------------------------
This SF.Net email is sponsored by the new InstallShield X.
From Windows to Linux, servers to mobile, InstallShield X is the one
installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504
_______________________________________________
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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Run script when USB scanner unplugged
  2004-06-02 20:28 Run script when USB scanner unplugged Ian Pilcher
                   ` (6 preceding siblings ...)
  2004-06-05 16:05 ` Greg KH
@ 2004-06-05 17:35 ` Ian Pilcher
  2004-06-05 17:36 ` Ian Pilcher
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Ian Pilcher @ 2004-06-05 17:35 UTC (permalink / raw)
  To: linux-hotplug

Greg KH wrote:
> 
> Um, why?  That usbfs file is _not_ a device node.  Anyway...
> 

libusb seems to use the permissions on that file to determine who is
allowed to access the scanner.  So it acts like a device node for this
purpose.

> 
> I don't know, sorry.  Never used the remove stuff myself...
> 

I get the feeling that no one else has either.

-- 
====================================
Ian Pilcher                                        i.pilcher@comcast.net
====================================


-------------------------------------------------------
This SF.Net email is sponsored by the new InstallShield X.
From Windows to Linux, servers to mobile, InstallShield X is the one
installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504
_______________________________________________
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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Run script when USB scanner unplugged
  2004-06-02 20:28 Run script when USB scanner unplugged Ian Pilcher
                   ` (7 preceding siblings ...)
  2004-06-05 17:35 ` Ian Pilcher
@ 2004-06-05 17:36 ` Ian Pilcher
  2004-06-05 18:26 ` Bertrik Sikken
  2004-06-08  0:30 ` Marcelo Ricardo Leitner
  10 siblings, 0 replies; 12+ messages in thread
From: Ian Pilcher @ 2004-06-05 17:36 UTC (permalink / raw)
  To: linux-hotplug

Bertrik Sikken wrote:
> 
> 
> FC2 uses a linux 2.6 kernel right?
> Kernel 2.6 no longer has the scanner kernel module, so there's
> no longer a device node associated with it (or am I
> overlooking something here?).
> Communication with an USB scanner under kernel 2.6 is done with
> libusb instead (using the files in /proc/bus/usb).
> 

So it looks like udev won't help here.

So my original question still stands -- how do I get hotplug to run a
script when a USB device is unplugged?

-- 
====================================
Ian Pilcher                                        i.pilcher@comcast.net
====================================


-------------------------------------------------------
This SF.Net email is sponsored by the new InstallShield X.
From Windows to Linux, servers to mobile, InstallShield X is the one
installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504
_______________________________________________
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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Run script when USB scanner unplugged
  2004-06-02 20:28 Run script when USB scanner unplugged Ian Pilcher
                   ` (8 preceding siblings ...)
  2004-06-05 17:36 ` Ian Pilcher
@ 2004-06-05 18:26 ` Bertrik Sikken
  2004-06-08  0:30 ` Marcelo Ricardo Leitner
  10 siblings, 0 replies; 12+ messages in thread
From: Bertrik Sikken @ 2004-06-05 18:26 UTC (permalink / raw)
  To: linux-hotplug

Ian Pilcher wrote:

> Greg KH wrote:
> 
>> On Wed, Jun 02, 2004 at 03:28:00PM -0500, Ian Pilcher wrote:
>>
>>> Running Fedora Core 2 here.  I've found that the hotplug scripts shipped
>>> with the distribution do a fine job of setting the permissions when a
>>> USB scanner is plugged in *after* a user has logged in.
>>
>>
>>
>> There is no /dev node for a USB scanner anymore, as there is no kernel
>> driver for it in 2.6.  Do you realize this?  Because of this, modifying
>> the hotplug scripts will be quite difficult, and udev will know nothing
>> about this kind of device, sorry.
>>
> 
> /etc/hotplug/usb/libusbscanner, as shipped with Fedora Core 2, already
> sets the ownership of the appropriate /proc/bus/usb/... file to the
> "console" user.  This works fine when a scanner is plugged in *after*
> the user has logged on.
> 
> I've hacked /etc/hotplug/usb/libusbscanner to create a symbolic link
> from /dev/usb/scanner-%sys%devices%pci%... to that /proc/bus/usb...
> file.  When the USB "insertion" is processed during system boot, the
> symlink gets created.  Then when a "console" user logs on, PAM follows
> the symlink and sets the ownership of the /proc/bus/usb... file
> appropriately.
> 
> All I want to do is run a script during the USB "remove" event to get
> rid of this symlink.  Reading through /etc/hotplug/usb.agent, it looks
> like I should be able to put a script in the location specified by the
> ${REMOVER} variable, but I've tried this and it never gets executed.
> 
> What do I need to do?

I'm not really an expert with hotplug, however I got remove to work
after a bit of experimentation (and some minimal testing).
On the 'add' event, the user script create a symbolic link at
$REMOVER to itself. When the remove occurs, the same script is
called again, but now with ACTION=remove.

Kind regards,
Bertrik

(my script follows)

#!/bin/bash

# hack: wait 1 second to improve chance that /proc/bus/usb file is 
present during add
sleep 1

# handle add event
if [ "${ACTION}" = "add" ] && [ -f "${DEVICE}" ]
then
	logger -t netmd NetMD plugged in at $DEVICE
	chown root.usb $DEVICE
	chmod ug+w $DEVICE
	# create symbolic link for remove event
	ln -s /etc/hotplug/usb/minidisc $REMOVER
fi

# handle remove event
if [ "${ACTION}" = "remove" ]
then
	logger -t netmd NetMD unplugged from $DEVICE
fi



-------------------------------------------------------
This SF.Net email is sponsored by the new InstallShield X.
From Windows to Linux, servers to mobile, InstallShield X is the one
installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504
_______________________________________________
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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Run script when USB scanner unplugged
  2004-06-02 20:28 Run script when USB scanner unplugged Ian Pilcher
                   ` (9 preceding siblings ...)
  2004-06-05 18:26 ` Bertrik Sikken
@ 2004-06-08  0:30 ` Marcelo Ricardo Leitner
  10 siblings, 0 replies; 12+ messages in thread
From: Marcelo Ricardo Leitner @ 2004-06-08  0:30 UTC (permalink / raw)
  To: linux-hotplug

On Sáb Jun 05, 2004 at 11:01:23 -0500, Ian Pilcher wrote:
> All I want to do is run a script during the USB "remove" event to get
> rid of this symlink.  Reading through /etc/hotplug/usb.agent, it looks
> like I should be able to put a script in the location specified by the
> ${REMOVER} variable, but I've tried this and it never gets executed.
> 
> What do I need to do?
---end quoted text---

Take a look at Conectiva's hotplug and usb-mount packages. Hotplug got some
patches and usb-mount is responsible for creating .desktop files at
~consoleuser/Desktop to allow easy usb mass-storage integration.
It uses the ${REMOVER} for removing/unmounting when the device is gone.

-- 
Marcelo Ricardo Leitner <mrl@conectiva.com.br>


-------------------------------------------------------
This SF.Net email is sponsored by: GNOME Foundation
Hackers Unite!  GUADEC: The world's #1 Open Source Desktop Event.
GNOME Users and Developers European Conference, 28-30th June in Norway
http://2004/guadec.org
_______________________________________________
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

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2004-06-08  0:30 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-06-02 20:28 Run script when USB scanner unplugged Ian Pilcher
2004-06-03  8:34 ` Harald Hoyer
2004-06-03 17:36 ` Ian Pilcher
2004-06-04 13:55 ` Ian Pilcher
2004-06-04 17:07 ` Bertrik Sikken
2004-06-04 21:13 ` Greg KH
2004-06-05 16:01 ` Ian Pilcher
2004-06-05 16:05 ` Greg KH
2004-06-05 17:35 ` Ian Pilcher
2004-06-05 17:36 ` Ian Pilcher
2004-06-05 18:26 ` Bertrik Sikken
2004-06-08  0:30 ` Marcelo Ricardo Leitner

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).