Re: Linux hotplug - doesn't seem to work

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Alan,

Thanks for the reply.

Yes, my /sbin/hotplug script works as intended if run manually.
Like you said, running the whole udev is not feasible due to the
memory constraints.

Regards,
-Sujith

On Mon, Nov 2, 2009 at 4:01 PM, Alan Jenkins
<sourcejedi.lkml@xxxxxxxxxxxxxx> wrote:
> On 11/2/09, Sujith Sankar <sujithsankar1@xxxxxxxxx> wrote:
>> Hi,
>>
>> In the embedded application that I'm working on, I need to mount USB
>> mass storage devices when they are plugged in.
>>
>> After going through the documentation, it seems that Linux hotplug
>> could help in achieving this.  For this, CONFIG_HOTPLUG was enabled
>> using make menuconfig.  When Linux comes up, I see that
>>     -  "cat /proc/sys/kernel/hotplug" gives "/sbin/hotplug", but such
>> a file (/sbin/hotplug) is not there.
>>     -   Creating my own /sbin/hotplug which echoes "hotplug" to
>> /root/log does not echo "hotplug" to /root/log when I insert or remove
>> a USB mass storage device.  This shows that /sbin/hotplug is not
>> getting invoked.
>
> Stupid question here - I take it you tried running /sbin/hotplug
> manually, and checking that it does the right thing?
>
>>     -   If a USB mass storage device is plugged in, the USB subsystem
>> identifies it.  After this, if busybox mdev (which, I believe, is a
>> scaled down version of udev, but not a daemon) is run,
>> /dev/device_file is getting created.  The device could be mounted
>> using the command "mount -t vfat /dev/device_file /mnt".  (busybox
>> mdev allows automating this mounting through its conf file)
>>
>> 1.  Is there any other configuration that is required to make USB hotplug
>> work?
>
> I don't think so.
>
>> 2.  To achieve USB hotplug, is there a better (in terms of memory
>> usage as well) way than hooking busybox mdev to USB hotplug trigger?
>
> Hooking mdev seems a perfectly good way to do this.  There's no
> obvious alternative, unless you want to run the full udev daemon
> instead... and I don't think that would make it any easier.
>
>> I feel that things could fall in place if I could get this USB hotplug
>> working.  It would be great if someone could help me out with this.
>
--
To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Linux DVB]     [Asterisk Internet PBX]     [DCCP]     [Netdev]     [X.org]     [Util Linux NG]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux