ndev
Vladimir Dronnikov
dronnikov at gmail.com
Sun Nov 8 18:04:11 UTC 2009
> Great !!
Thanks for reply.
> I made some changes to ndev:
> 1/ Since kernel version 2.6.27, there are a new directories
> /sys/dev/(block,char),
> please read linux/Documentation/ABI/testing/sysfs-dev, I used only one time
> recursive_action("/sys/dev",...).
For kernels < 2.6.27 you should then add workaround.
> 2/ Run only one instance of ndev as daemon using /dev/.ndev lock file.
> 3/ Use 2 options -c(onfig_file) to parse mdev.conf, -f(foregound),
Once I've discovered runit, I put it clear to myself -- the tool
itself must not become a daemon -- there are separate backgrounders
for doing that.
Also, you've changed the logic -- now ndev performs coldplug job and
then _unconditionally_ starts serving. That is why all about locking.
My version leaves it up to the user how exactly should ndev be run.
> I removed
> -s option for make ndev scan automatically /sys/dev
You've removed also -S option -- to perform deep device analysis.
Pseudo-devices (PNP, speaker, network interfaces, so on) can only be
accessed out of there.
> 4/Create a simple symlinks: fd -> /proc/self/fd
>
This would perform upon _every_ hotplug event -- a kind of quirk, IMHO.
You see, I mentioned all the cases of usage:
>> I use it as follows:
>> * in initramfs /init: "ndev -sc" to fast create block device nodes --
>> they are used to locate root filesystem. -c means don't snoop into
>> /etc/mdev.conf
That is because the speed is needed. We just want bare /dev/[hs]d*
nodes, no matter rules. This should be blazing fast.
>> * in /sbin/init: "ndev -S&" to perform in background deep search for
>> all present devices (say, network adapters, too)
Find-all-devices mode, now respecting rules -- this is lenghty -- that
is why I shedule this step as background job. Once the job is done,
ndev exits.
>> * during runtime as daemon to operate hotplug events: "ndev&"
>>
Frankly, as a runit service (see ./examples, Denys has started to
share his experience).
>From usage cases came options -- the most useful case has to be
default -- so "ndev" to serve respecting rules, "ndev -s -c" to scan
neglecting rules. Just explained the reasons.
Let's collect users (if any:) and requests for features (if any, again).
Best regards,
--
Vladimir
More information about the busybox
mailing list