* [RFC] /sbin/hotplug multiplexor - take 2
@ 2003-04-14 22:46 Greg KH
2003-04-15 19:19 ` David Brownell
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: Greg KH @ 2003-04-14 22:46 UTC (permalink / raw)
To: linux-hotplug
Ok, based on the comments so far, how about this proposed version of
/sbin/hotplug to provide a multiplexor?
thanks,
greg k-h
----------
#!/bin/sh
DIR="/etc/hotplug.d"
for I in "${DIR}/$1/"* "${DIR}/"all/* ; do
test -x $I && $I $1 ;
done
exit 1
----------
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
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] 9+ messages in thread
* Re: [RFC] /sbin/hotplug multiplexor - take 2
2003-04-14 22:46 [RFC] /sbin/hotplug multiplexor - take 2 Greg KH
@ 2003-04-15 19:19 ` David Brownell
2003-04-16 0:01 ` Perez-Gonzalez, Inaky
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: David Brownell @ 2003-04-15 19:19 UTC (permalink / raw)
To: linux-hotplug
Greg KH wrote:
> Ok, based on the comments so far, how about this proposed version of
> /sbin/hotplug to provide a multiplexor?
It'd be a reduction in functionality. I could no longer just
type "/sbin/hotplug" to see what agents disabled or missing ...
or notice that since hotplugging was on, the problem had to be
RH9 storing /bin/true into /proc/sys/kernel/hotplug again! :P
If the idea is just to loosen today's "one agent per event"
rule (I've had that idea too), then wouldn't it be simpler to
just (a1) pay an extra process context, not using "exec" to run
/etc/hotplug/$1.agent, and when it returns (a2) THEN try other
programs? Or even (b) just modify appropriate agent scripts
to do so, instead of /sbin/hotplug?
I'd think better about this problem if I had a handful of
examples showing why category-specific or event-specific
dispatch wouldn't be preferable.
- Dave
> ----------
> #!/bin/sh
> DIR="/etc/hotplug.d"
>
> for I in "${DIR}/$1/"* "${DIR}/"all/* ; do
> test -x $I && $I $1 ;
> done
>
> exit 1
> ----------
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
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] 9+ messages in thread
* RE: [RFC] /sbin/hotplug multiplexor - take 2
2003-04-14 22:46 [RFC] /sbin/hotplug multiplexor - take 2 Greg KH
2003-04-15 19:19 ` David Brownell
@ 2003-04-16 0:01 ` Perez-Gonzalez, Inaky
2003-04-16 4:45 ` Greg KH
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Perez-Gonzalez, Inaky @ 2003-04-16 0:01 UTC (permalink / raw)
To: linux-hotplug
> From: Greg KH [mailto:greg@kroah.com]
>
> ...
>
> for I in "${DIR}/$1/"* "${DIR}/"all/* ; do
> test -x $I && $I $1 ;
test -x "$I" && "$I" "$1"
Just in case?
Iñaky Pérez-González -- Not speaking for Intel -- all opinions are my own
(and my fault)
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
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] 9+ messages in thread
* Re: [RFC] /sbin/hotplug multiplexor - take 2
2003-04-14 22:46 [RFC] /sbin/hotplug multiplexor - take 2 Greg KH
2003-04-15 19:19 ` David Brownell
2003-04-16 0:01 ` Perez-Gonzalez, Inaky
@ 2003-04-16 4:45 ` Greg KH
2003-04-16 6:22 ` Frederic Lepied
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Greg KH @ 2003-04-16 4:45 UTC (permalink / raw)
To: linux-hotplug
On Tue, Apr 15, 2003 at 12:19:51PM -0700, David Brownell wrote:
> Greg KH wrote:
> >Ok, based on the comments so far, how about this proposed version of
> >/sbin/hotplug to provide a multiplexor?
>
> It'd be a reduction in functionality. I could no longer just
> type "/sbin/hotplug" to see what agents disabled or missing ...
> or notice that since hotplugging was on, the problem had to be
> RH9 storing /bin/true into /proc/sys/kernel/hotplug again! :P
Well you can still do that, the current scripts will get run that way
too.
> If the idea is just to loosen today's "one agent per event"
> rule (I've had that idea too), then wouldn't it be simpler to
> just (a1) pay an extra process context, not using "exec" to run
> /etc/hotplug/$1.agent, and when it returns (a2) THEN try other
> programs? Or even (b) just modify appropriate agent scripts
> to do so, instead of /sbin/hotplug?
>
> I'd think better about this problem if I had a handful of
> examples showing why category-specific or event-specific
> dispatch wouldn't be preferable.
udev is such an example. I want it to run for every hotplug event. To
do that with the current scripts, I have to either modify the current
scripts to always call it (not a big deal, I have CVS access :) or add a
handler for every type of device, and every type of those devices.
devlabel is also another type of example. The author of that had to
persuade us to modify the scripts in order to get support for his
program. I don't want to be a gating function, with this simple
proposal, he could just dump the devlabel script into the /etc/hotplug.d
directory in the proper place and everything would just work.
I've also been hearing from lots of other people (interestingly, not
publicly, I guess they like to stay hidden for some reason) that also
hook the hotplug scripts. They have usually been either recommending
that their users patch the current script, or just replace the current
ones all together (thereby loosing the module load functionality) in
order to support their devices. This proposal would also help them, and
their users.
thanks,
greg k-h
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
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] 9+ messages in thread
* Re: [RFC] /sbin/hotplug multiplexor - take 2
2003-04-14 22:46 [RFC] /sbin/hotplug multiplexor - take 2 Greg KH
` (2 preceding siblings ...)
2003-04-16 4:45 ` Greg KH
@ 2003-04-16 6:22 ` Frederic Lepied
2003-04-18 22:19 ` Greg KH
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Frederic Lepied @ 2003-04-16 6:22 UTC (permalink / raw)
To: linux-hotplug
Greg KH <greg@kroah.com> writes:
> Ok, based on the comments so far, how about this proposed version of
> /sbin/hotplug to provide a multiplexor?
I think it would be good to launch only the files ending by a special
extension to avoid running backup files. Something like that:
#!/bin/sh
DIR="/etc/hotplug.d"
for I in "${DIR}/$1/"*.hotplug "${DIR}/"all/*.hotplug ; do
test -x $I && $I $1 ;
done
--
Fred - May the source be with you
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
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] 9+ messages in thread
* Re: [RFC] /sbin/hotplug multiplexor - take 2
2003-04-14 22:46 [RFC] /sbin/hotplug multiplexor - take 2 Greg KH
` (3 preceding siblings ...)
2003-04-16 6:22 ` Frederic Lepied
@ 2003-04-18 22:19 ` Greg KH
2003-04-18 22:21 ` Greg KH
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Greg KH @ 2003-04-18 22:19 UTC (permalink / raw)
To: linux-hotplug
On Wed, Apr 16, 2003 at 08:22:13AM +0200, Frederic Lepied wrote:
> Greg KH <greg@kroah.com> writes:
>
> > Ok, based on the comments so far, how about this proposed version of
> > /sbin/hotplug to provide a multiplexor?
>
> I think it would be good to launch only the files ending by a special
> extension to avoid running backup files. Something like that:
Ah, good idea, will do.
thanks,
greg k-h
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
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] 9+ messages in thread
* Re: [RFC] /sbin/hotplug multiplexor - take 2
2003-04-14 22:46 [RFC] /sbin/hotplug multiplexor - take 2 Greg KH
` (4 preceding siblings ...)
2003-04-18 22:19 ` Greg KH
@ 2003-04-18 22:21 ` Greg KH
2003-04-19 18:22 ` David Brownell
2003-04-19 18:22 ` David Brownell
7 siblings, 0 replies; 9+ messages in thread
From: Greg KH @ 2003-04-18 22:21 UTC (permalink / raw)
To: linux-hotplug
On Tue, Apr 15, 2003 at 05:01:40PM -0700, Perez-Gonzalez, Inaky wrote:
>
> > From: Greg KH [mailto:greg@kroah.com]
> >
> > ...
> >
> > for I in "${DIR}/$1/"* "${DIR}/"all/* ; do
> > test -x $I && $I $1 ;
>
> test -x "$I" && "$I" "$1"
>
> Just in case?
Good idea, I've changed it.
thanks,
greg k-h
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
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] 9+ messages in thread
* Re: [RFC] /sbin/hotplug multiplexor - take 2
2003-04-14 22:46 [RFC] /sbin/hotplug multiplexor - take 2 Greg KH
` (6 preceding siblings ...)
2003-04-19 18:22 ` David Brownell
@ 2003-04-19 18:22 ` David Brownell
7 siblings, 0 replies; 9+ messages in thread
From: David Brownell @ 2003-04-19 18:22 UTC (permalink / raw)
To: linux-hotplug
Greg KH wrote:
> On Tue, Apr 15, 2003 at 12:19:51PM -0700, David Brownell wrote:
>
>>I'd think better about this problem if I had a handful of
>>examples showing why category-specific or event-specific
>>dispatch wouldn't be preferable.
>
>
> udev is such an example. I want it to run for every hotplug event. To
> do that with the current scripts, I have to either modify the current
> scripts to always call it (not a big deal, I have CVS access :) or add a
> handler for every type of device, and every type of those devices.
I'd go for the "always" call it (if /sys/$DEVPATH/dev exists and
udev is enabled). That's category-specific ... but the category is
determined by looking at system state, not the event type ($1).
> devlabel is also another type of example. The author of that had to
> persuade us to modify the scripts in order to get support for his
> program. I don't want to be a gating function, with this simple
> proposal, he could just dump the devlabel script into the /etc/hotplug.d
> directory in the proper place and everything would just work.
There's always some kind of gate! (And shouldn't "devlabel"
just morph into the "namedev" thing that "udev" wants, so it'd
go away soonish"?)
I guess there's a different question I see lurking, and that's
how "Hotplug NG" starts to develop -- how many things should
change, and why. Multiplexing is only one thing to consider,
likely more things should be on the table. Including how much
to tie to 2.5 capabilities like the new modprobe aliasing, and
how to get from here to there.
> I've also been hearing from lots of other people (interestingly, not
> publicly, I guess they like to stay hidden for some reason) that also
> hook the hotplug scripts. They have usually been either recommending
> that their users patch the current script, or just replace the current
> ones all together (thereby loosing the module load functionality) in
> order to support their devices. This proposal would also help them, and
> their users.
I like the direction of allowing easier extensibility.
But I do worry about making it too easy to create chaos.
Maybe I worry too much -- the bad mutations should just
die out, rather than becoming a cancer that kills.
- Dave
> thanks,
>
> greg k-h
>
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
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] 9+ messages in thread
* Re: [RFC] /sbin/hotplug multiplexor - take 2
2003-04-14 22:46 [RFC] /sbin/hotplug multiplexor - take 2 Greg KH
` (5 preceding siblings ...)
2003-04-18 22:21 ` Greg KH
@ 2003-04-19 18:22 ` David Brownell
2003-04-19 18:22 ` David Brownell
7 siblings, 0 replies; 9+ messages in thread
From: David Brownell @ 2003-04-19 18:22 UTC (permalink / raw)
To: linux-hotplug
Greg KH wrote:
> On Tue, Apr 15, 2003 at 12:19:51PM -0700, David Brownell wrote:
>
>>I'd think better about this problem if I had a handful of
>>examples showing why category-specific or event-specific
>>dispatch wouldn't be preferable.
>
>
> udev is such an example. I want it to run for every hotplug event. To
> do that with the current scripts, I have to either modify the current
> scripts to always call it (not a big deal, I have CVS access :) or add a
> handler for every type of device, and every type of those devices.
I'd go for the "always" call it (if /sys/$DEVPATH/dev exists and
udev is enabled). That's category-specific ... but the category is
determined by looking at system state, not the event type ($1).
> devlabel is also another type of example. The author of that had to
> persuade us to modify the scripts in order to get support for his
> program. I don't want to be a gating function, with this simple
> proposal, he could just dump the devlabel script into the /etc/hotplug.d
> directory in the proper place and everything would just work.
There's always some kind of gate! (And shouldn't "devlabel"
just morph into the "namedev" thing that "udev" wants, so it'd
go away soonish"?)
I guess there's a different question I see lurking, and that's
how "Hotplug NG" starts to develop -- how many things should
change, and why. Multiplexing is only one thing to consider,
likely more things should be on the table. Including how much
to tie to 2.5 capabilities like the new modprobe aliasing, and
how to get from here to there.
> I've also been hearing from lots of other people (interestingly, not
> publicly, I guess they like to stay hidden for some reason) that also
> hook the hotplug scripts. They have usually been either recommending
> that their users patch the current script, or just replace the current
> ones all together (thereby loosing the module load functionality) in
> order to support their devices. This proposal would also help them, and
> their users.
I like the direction of allowing easier extensibility.
But I do worry about making it too easy to create chaos.
Maybe I worry too much -- the bad mutations should just
die out, rather than becoming a cancer that kills.
- Dave
> thanks,
>
> greg k-h
>
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
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] 9+ messages in thread
end of thread, other threads:[~2003-04-19 18:22 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-04-14 22:46 [RFC] /sbin/hotplug multiplexor - take 2 Greg KH
2003-04-15 19:19 ` David Brownell
2003-04-16 0:01 ` Perez-Gonzalez, Inaky
2003-04-16 4:45 ` Greg KH
2003-04-16 6:22 ` Frederic Lepied
2003-04-18 22:19 ` Greg KH
2003-04-18 22:21 ` Greg KH
2003-04-19 18:22 ` David Brownell
2003-04-19 18:22 ` 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).