[linux-elitists] Per-user network up and down scripts

Greg KH greg@kroah.com
Fri Dec 5 11:42:07 PST 2008


On Fri, Dec 05, 2008 at 11:06:11AM -0800, Rick Moen wrote:
> Quoting Greg KH (greg@kroah.com):
> 
> > Then go back to a 5 year old distro and see how well it works for
> > dynamic devices and proper multi-user permissions on those devices.
> 
> Succinctly put.
> 
> A system events such as loading a module, pressing a hotkey, closing a
> laptop lid, inserting or removing a dynamic device occurs.  With the
> last of those as an example, attaching or removing a USB flash drive
> triggers kobject uevent() or kobject uevent env() in the kernel, which
> transmits the event to udevd, which registers it in an abstract socket,
> managing device nodes according to rules in /etc/udev.  HAL reads that
> event, coreates a device object under /org/freedesktop/Hal/devices/, and
> emits a DeviceAdded signal.  Which signal applications can then notice
> via the D-BUS system bus.  Right?

right.

> That's all fine.  Where I have a problem is the need to run some
> squirrely automounter just to be able to deal with the occasional
> comings and goings of USB flash drives, printers, and so on.

printers are not automounted.

But you do need persistant device naming for your printers, that is why
the whole udev thing was started in the first place (consider 2 USB
printers plugged into one machine, they need to have the same name no
matter which one is seen first by the box, and they will be found in
different orders on different boot times.)

> I don't acquire and throw away printers like tissue paper, and
> mount/umount for dynamic drive volumes with proper user permissions
> suits me just fine.  You set it up in /etc/fstab, if necessary with
> UUID references, and it Just Works.

How does it "just work"?  I have about 10 different usb storage devices
here, and more collect every day.  You need some type of "automount"
system to be able to do this properly, and have them all show up in a
persistant location without any help from a user at all.

Oh, and are you going to tell my daughter to go edit /etc/fstab just to
plug in her new usb drive that she bought at the store?  I don't give
her the root password to the box, so how would she do that?

> As such, I really don't want to go visit GNOME Desktop -> Preferences ->
> Removable Drives and Media to configure what gnome-volume-manager/pmount-hal 
> do when that flash drive comes or goes -- because more than likely I
> don't want GNOME Desktop and all of its kin.  Nor the kio_media stuff,
> nor Thunar/gamin/pmount.

gnome and kde, "out of the box" have sensible defaults for how to do
this.  You should never have to configure anything unless you want to do
"special" things.

> It's madness to require layers upon layers of libs/daemons, all with
> long, fragile dependency lists, and one of {supermount|submount|ivman}
> as autmounter.  I shouldn't need to run an automounter at all, just to
> mount/umount freakin' flash drives.

Without an automounter, how are you going to automatically mount a usb
device that is plugged into your machine?  The kernel itself sure isn't
going to do it.

thanks,

greg k-h


More information about the linux-elitists mailing list