<p><br>
On Mar 21, 2012 10:04 PM, &quot;Alan Mackenzie&quot; &lt;<a href="mailto:acm@muc.de">acm@muc.de</a>&gt; wrote:<br>
&gt;<br>
&gt; Hello again,<br>
&gt;<br>
&gt; On Wed, Mar 21, 2012 at 08:12:40PM +0700, Pandu Poluan wrote:<br>
&gt; &gt; On Mar 21, 2012 8:07 PM, &quot;Alan Mackenzie&quot; &lt;<a href="mailto:acm@muc.de">acm@muc.de</a>&gt; wrote:<br>
&gt;<br>
&gt; &gt; &gt; On Wed, Mar 21, 2012 at 07:49:02PM +0700, Pandu Poluan wrote:<br>
&gt; &gt; &gt; &gt; Strange...<br>
&gt;<br>
&gt; &gt; &gt; &gt; Do you use mdev to handle hotplugs, btw?<br>
&gt;<br>
&gt; &gt; &gt; You mean, like sticking in a USB stick, or turning my printer on?  Yes, I<br>
&gt; &gt; &gt; do.<br>
&gt;<br>
&gt;<br>
&gt; &gt; No, I mean, did you do :<br>
&gt;<br>
&gt; &gt; echo /bin/mdev &gt; /proc/sys/kernel/hotplug<br>
&gt;<br>
&gt; No I haven&#39;t.  I don&#39;t understand at all what this is about.  Any chance<br>
&gt; of a quick summary?<br>
&gt;</p>
<p>According to the busybox documentation, /proc/sys/kernel/hotplug contains the path to a program that will be invoked on hotplug events (hotplug here means the creation of a new device node under /dev, not necessarily actually plugging something onto the box).</p>

<p>Doing the above &#39;echo&#39; will result in kernel invoking mdev when a hotplug event fires; mdev will then act upon the newly-created device node according to the &#39;recipe&#39; in /etc/mdev.conf, e.g., chown-ing the node, renaming/moving the node, making a symlink, or even triggering a script.</p>

<p>The above line should go right after the &#39;mdev -s&#39; line in linuxrc.</p>
<p>&gt; &gt; (ensure beforehand that /bin/mdev is a symlink to /bin/busybox)<br>
&gt;<br>
&gt; my /sbin/mdev is an indirect symlink to /bin/busybox as follows:<br>
&gt;    ^<br>
&gt;<br>
&gt;    /sbin/mdev -&gt; /bin/bb -&gt; busybox<br>
&gt;<br>
&gt; Presumably this would be OK.<br>
&gt;</p>
<p>I think so...</p>
<p>Rgds,<br>
</p>