[Linux-disciples] Re: hotplug issues
Adam Rosi-Kessel
adam at rosi-kessel.org
Mon Mar 7 10:21:24 EST 2005
It sounds like you might misunderstand how hotplug works and what it's
purpose is.
If you want to see if hotplug is 'live', cat /proc/sys/kernel/hotplug.
If there is something in there (/sbin/hotplug), then hotplug is active.
The script in /etc/init.d just puts a value in /proc/sys/kernel/hotplug,
to tell the kernel what to run to detect new devices and device changes.
You don't need to keep running hotplug -- it's either 'on', or it's not.
I'm not aware of any hotplug default functionality for automounting,
though. I think you could write a custom script such that when a new
device was detected, hotplug called a mount script if it is a storage
device--I actually did that once--but it's not really the right way to
handle it.
You probably want something at a higher level, like the automounter
daemon (autofs), or the gnome automounter. Check out, e.g.,
gnome-volume-manager
<http://packages.debian.org/unstable/gnome/gnome-volume-manager>:
gnome-volume-manager is a GNOME daemon that acts as a policy agent in
top of the kernel, udev, d-bus and HAL. It listens to HAL events and
reacts with user-configurable actions. Currently it supports automount
of new media and hot-plugged devices, autorun, autoplay for CDs and
DVDs, and automatic camera management. It is expected to be simple and
free of polling and other evil hacks.
On Sun, Mar 06, 2005 at 10:32:36PM -0500, Brian Cooke wrote:
> >What happens when you do those things?
>
>
> I don't get any results for any of the commands you listed below. Do I
> need pci_hotplug installed in my kernel for this? I was under the
> impression that I didn't need it if I only wanted to use hotplug for USB
> devices.
>
> > What prompted you to check whether hotplug was working? Are
> > you having troubles with USB devices?
>
> I got an external USB hard drive and I'll like it to mount automatically
> when the computer boots. I have a hotplug script in my /etc/init.d/
> directory, but I see no evidence that it is running (or attempting to
> run) despite the fact that is linked in the appropriate /etc/rc?.d
> directories. So then I tried running the /etc/init.d/hotplug script
> manually, and I'm still not getting any output for start, stop, or
> status at the command line either. I figure I will need to get it
> working from the command line before I can expect the startup scripts to
> run it...
>
> Brian
>
> >When I look at
> >
> >dmesg |grep -i hotplug
> >
> >I get
> >
> >/*
> >cpci_hotplug: CompactPCI Hot Plug Core version: 0.2
> >pci_hotplug: PCI Hot Plug PCI Core version: 0.5
> >*/
> >
> >When I do '/etc/init.d/hotplug start' or '[same thing] stop'
> >I get no problems: I get the '[OK]' indicator that Ubuntu
> >normally gives.
> >
> >When I do 'lsmod |grep -i plug', I get
> >
> >pci_hotplug 33680 2 shpchp,pciehp
> >
> >Finally, checking the contents of /var/log/syslog for
> >anything matching 'hotplug' returns the same lines that
> >dmesg gives.
> >
> >
> >
>
> _______________________________________________
> Linux-disciples mailing list
> Linux-disciples at lists.bostoncoop.net
> http://lists.bostoncoop.net/mailman/listinfo/linux-disciples
--
Adam Rosi-Kessel
http://adam.rosi-kessel.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.bostoncoop.net/pipermail/linux-disciples/attachments/20050307/ff647256/attachment.pgp
More information about the Linux-disciples
mailing list