* REMOVER support without usbdevfs
@ 2002-01-07 17:28 Fumitoshi UKAI
2002-01-07 18:18 ` David Brownell
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Fumitoshi UKAI @ 2002-01-07 17:28 UTC (permalink / raw)
To: linux-hotplug
Hi,
I've receive the following bug reports: http://bugs.debian.org/128121
> In /etc/hotplug/usb.agent REMOVER is made from the contens of DEVICE
> which is empty if usbdevfs is not present, i.e. REMOVER will be set
> to /var/run/usb/ instead of /var/run/usb/somefile.
> Thus program relying on REMOVER to install a remover script will
> fail to do so.
> I've circumvented this by checking whether DEVICE is empty and then
> generating REMOVER from INTERFACE PRODUCT and TYPE. note however
> that DEVICE may not be set to anything, since hotplug.functions
> takes it as an indicator whether usbdevfs is present or not.
So is there any problem like this?
if [ "$DEVICE" = "" ]; then
declare -rx REMOVER=/var/run/usb/`echo "$INTERFACE/$PRODUCT/$TYPE" | sed -e 's;/;%;g'`
else
declare -rx REMOVER=/var/run/usb/`echo $DEVICE | sed -e 's;/;%;g'`
fi
Regards,
Fumitoshi UKAI
_______________________________________________
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] 4+ messages in thread
* Re: REMOVER support without usbdevfs
2002-01-07 17:28 REMOVER support without usbdevfs Fumitoshi UKAI
@ 2002-01-07 18:18 ` David Brownell
2002-01-08 17:47 ` Fumitoshi UKAI
2002-01-08 18:17 ` David Brownell
2 siblings, 0 replies; 4+ messages in thread
From: David Brownell @ 2002-01-07 18:18 UTC (permalink / raw)
To: linux-hotplug
Looks right to me. Please submit a patch to fix this bug.
- Dave
----- Original Message -----
From: "Fumitoshi UKAI" <ukai@debian.or.jp>
To: <linux-hotplug-devel@lists.sourceforge.net>
Sent: Monday, January 07, 2002 9:28 AM
Subject: REMOVER support without usbdevfs
> Hi,
>
> I've receive the following bug reports: http://bugs.debian.org/128121
>
> > In /etc/hotplug/usb.agent REMOVER is made from the contens of DEVICE
> > which is empty if usbdevfs is not present, i.e. REMOVER will be set
> > to /var/run/usb/ instead of /var/run/usb/somefile.
>
> > Thus program relying on REMOVER to install a remover script will
> > fail to do so.
>
> > I've circumvented this by checking whether DEVICE is empty and then
> > generating REMOVER from INTERFACE PRODUCT and TYPE. note however
> > that DEVICE may not be set to anything, since hotplug.functions
> > takes it as an indicator whether usbdevfs is present or not.
>
> So is there any problem like this?
>
> if [ "$DEVICE" = "" ]; then
> declare -rx REMOVER=/var/run/usb/`echo "$INTERFACE/$PRODUCT/$TYPE" | sed -e 's;/;%;g'`
> else
> declare -rx REMOVER=/var/run/usb/`echo $DEVICE | sed -e 's;/;%;g'`
> fi
>
> Regards,
> Fumitoshi UKAI
>
> _______________________________________________
> 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
_______________________________________________
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] 4+ messages in thread
* Re: REMOVER support without usbdevfs
2002-01-07 17:28 REMOVER support without usbdevfs Fumitoshi UKAI
2002-01-07 18:18 ` David Brownell
@ 2002-01-08 17:47 ` Fumitoshi UKAI
2002-01-08 18:17 ` David Brownell
2 siblings, 0 replies; 4+ messages in thread
From: Fumitoshi UKAI @ 2002-01-08 17:47 UTC (permalink / raw)
To: linux-hotplug
At Mon, 07 Jan 2002 10:18:22 -0800,
David Brownell wrote:
>
> Looks right to me. Please submit a patch to fix this bug.
I just committed a following patch to cvs repository. Is this ok?
Index: usb.agent
=================================RCS file: /cvsroot/linux-hotplug/admin/etc/hotplug/usb.agent,v
retrieving revision 1.15
diff -u -u -r1.15 usb.agent
--- usb.agent 2001/09/07 15:57:39 1.15
+++ usb.agent 2002/01/08 17:43:42
@@ -281,7 +281,11 @@
# declare a REMOVER name that the add action can use to create a
# remover, or that the remove action can use to execute a remover.
#
-declare -rx REMOVER=/var/run/usb/`echo $DEVICE | sed -e 's;/;%;g'`
+if [ "$DEVICE" = "" ]; then
+ declare -rx REMOVER=/var/run/usb/`echo "$INTERFACE/$PRODUCT/$TYPE" | sed -e 's;/;%;g'`
+else
+ declare -rx REMOVER=/var/run/usb/`echo $DEVICE | sed -e 's;/;%;g'`
+fi
#
# What to do with this USB hotplug event?
Regards,
Fumitoshi UKAI
> ----- Original Message -----
> From: "Fumitoshi UKAI" <ukai@debian.or.jp>
> To: <linux-hotplug-devel@lists.sourceforge.net>
> Sent: Monday, January 07, 2002 9:28 AM
> Subject: REMOVER support without usbdevfs
>
>
> > Hi,
> >
> > I've receive the following bug reports: http://bugs.debian.org/128121
> >
> > > In /etc/hotplug/usb.agent REMOVER is made from the contens of DEVICE
> > > which is empty if usbdevfs is not present, i.e. REMOVER will be set
> > > to /var/run/usb/ instead of /var/run/usb/somefile.
> >
> > > Thus program relying on REMOVER to install a remover script will
> > > fail to do so.
> >
> > > I've circumvented this by checking whether DEVICE is empty and then
> > > generating REMOVER from INTERFACE PRODUCT and TYPE. note however
> > > that DEVICE may not be set to anything, since hotplug.functions
> > > takes it as an indicator whether usbdevfs is present or not.
> >
> > So is there any problem like this?
> >
> > if [ "$DEVICE" = "" ]; then
> > declare -rx REMOVER=/var/run/usb/`echo "$INTERFACE/$PRODUCT/$TYPE" | sed -e 's;/;%;g'`
> > else
> > declare -rx REMOVER=/var/run/usb/`echo $DEVICE | sed -e 's;/;%;g'`
> > fi
> >
> > Regards,
> > Fumitoshi UKAI
> >
> > _______________________________________________
> > 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
>
>
_______________________________________________
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] 4+ messages in thread
* Re: REMOVER support without usbdevfs
2002-01-07 17:28 REMOVER support without usbdevfs Fumitoshi UKAI
2002-01-07 18:18 ` David Brownell
2002-01-08 17:47 ` Fumitoshi UKAI
@ 2002-01-08 18:17 ` David Brownell
2 siblings, 0 replies; 4+ messages in thread
From: David Brownell @ 2002-01-08 18:17 UTC (permalink / raw)
To: linux-hotplug
> > Looks right to me. Please submit a patch to fix this bug.
>
> I just committed a following patch to cvs repository. Is this ok?
Yes, thanks.
- Dave
_______________________________________________
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] 4+ messages in thread
end of thread, other threads:[~2002-01-08 18:17 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-01-07 17:28 REMOVER support without usbdevfs Fumitoshi UKAI
2002-01-07 18:18 ` David Brownell
2002-01-08 17:47 ` Fumitoshi UKAI
2002-01-08 18:17 ` David Brownell
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).