linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC] /sbin/hotplug multiplexor
@ 2003-04-14 19:00 Greg KH
  2003-04-14 19:16 ` Oliver Neukum
  2003-04-14 22:46 ` [RFC] /sbin/hotplug multiplexor - take 2 Greg KH
  0 siblings, 2 replies; 24+ messages in thread
From: Greg KH @ 2003-04-14 19:00 UTC (permalink / raw)
  To: linux-hotplug-devel, linux-kernel

Hi all,

With the advent of a lot of people wanting to use /sbin/hotplug to add
their own different types of functions, I want to propose the following
replacement for the current /sbin/hotplug:

-----
#!/bin/sh
DIR="/etc/hotplug.d"

for I in "${DIR}/"* ; do
	$I $1 &
done

exit 1
-----

Then all scripts/programs/whatever that wants to get called when
/sbin/hotplug goes off can add themselves to the /etc/hotplug.d
directory.

This should help solve the recent devlabel issue with the current
hotplug scripts, and allow things like udev to also watch all hotplug
actions.

Any objections or comments?  If not, I'll make the changes in the
linux-hotplug project and release a new version based on this.

Thanks to Martin Schwenke for giving me this idea (even if he doesn't
realize it :)

Note, this is only for the "big" hotplug versions that live on
everyone's disk.  I'm still advocating something small like a
combination of udev and dietHotplug for the initramfs image.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 24+ messages in thread
* Re: [RFC] /sbin/hotplug multiplexor
@ 2003-04-14 22:04 Arnd Bergmann
  2003-04-14 22:21 ` Greg KH
  0 siblings, 1 reply; 24+ messages in thread
From: Arnd Bergmann @ 2003-04-14 22:04 UTC (permalink / raw)
  To: Oliver Neukum; +Cc: linux-kernel, Greg KH, linux-hotplug-devel

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Oliver Neukum wrote:

> Well, for a little elegance you might introduce subdirectories for each type
> of hotplug event and use only them.

I was just about to propose the same. Please use subdirs or namespaced files
like in:

for I in "${DIR}/$1".* "${DIR}/"default.* ; do
	test -x $I && $I $1
done

Note that a single event can not only cause one hotplug event for many devices
but also _multiple_ events for every device. E.g. enabling a dasd devices
will cause hotplug to be called for the local subchannel devices as well as
the actual (remote) disk. Maybe someone adds hotplug calls for partitions
and logical volumes.
Since dasds are usually not larger than 2GB, you are quite likely
to enable many at the same time. Imagine you get 500 disks * 4 events * 10
agents in response to a single user command...

	Arnd <><
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+mzBY5t5GS2LDRf4RAiGEAKCDfJCOqc+IwyzN1cFOOiFKuwqfFwCbBiEe
zaWlQP9P0s09DUNoF/xfdLs=
=c6xb
-----END PGP SIGNATURE-----


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

end of thread, other threads:[~2003-04-18 22:09 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-14 19:00 [RFC] /sbin/hotplug multiplexor Greg KH
2003-04-14 19:16 ` Oliver Neukum
2003-04-14 19:54   ` Greg KH
2003-04-14 20:09     ` Oliver Neukum
2003-04-14 20:33       ` Greg KH
2003-04-14 21:11         ` Oliver Neukum
2003-04-14 21:24           ` Kevin P. Fleming
2003-04-14 21:34             ` Greg KH
2003-04-14 21:45             ` Robert Love
2003-04-15 18:17               ` Frank van Maarseveen
2003-04-15 19:59               ` David Brownell
2003-04-14 21:30           ` Greg KH
2003-04-14 21:43             ` Oliver Neukum
2003-04-14 21:52               ` Greg KH
2003-04-14 22:19                 ` Oliver Neukum
2003-04-14 22:44                   ` Greg KH
2003-04-14 22:46 ` [RFC] /sbin/hotplug multiplexor - take 2 Greg KH
2003-04-15 19:19   ` David Brownell
2003-04-16  4:45     ` Greg KH
2003-04-16  6:22   ` Frederic Lepied
2003-04-18 22:19     ` Greg KH
2003-04-14 22:04 [RFC] /sbin/hotplug multiplexor Arnd Bergmann
2003-04-14 22:21 ` Greg KH
2003-04-14 22:23   ` Arnd Bergmann

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