LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   mdev not updating from hotplug (https://www.linuxquestions.org/questions/linux-newbie-8/mdev-not-updating-from-hotplug-4175415855/)

xerox 07-10-2012 04:01 AM

mdev not updating from hotplug
 
Hi,

I'm using mdev with hotplug from busybox to dynamically detect USB.

I have configured /etc/mdev.conf which is to run a script on detection of device sdb[1-9].

The script is being run when USB is connected, however this only happens when given command:

Code:

mdev -s
I have done:

Code:

echo /sbin/mdev > /proc/sys/kernel/hotplug
Why is this is not happening dynamically?

Is there some work around for this?

Thanks,
xerox

xerox 07-13-2012 05:49 AM

In fact my hotplug, was firing mdev, but I could not observe any output logs in console from the echo command in my script.

These were only observed after:

Code:

mdev -s
As mentioned in /docs/mdev.txt:

Quote:

You should also keep in mind that the kernel executes hotplug helpers with stdin, stdout, and stderr connected to /dev/null.
When i redirected my echo statements to a file, i was able to observe that my script was executing.

Thanks,
Xerox


All times are GMT -5. The time now is 06:12 PM.