DragonFly BSD
DragonFly users List (threaded) for 2010-08
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: Utility to list /dev/nodes & serno's


From: Aggelos Economopoulos <aoiko@xxxxxxxxxxxxxx>
Date: Thu, 19 Aug 2010 15:54:20 +0300

On 08/19/2010 02:13 PM, Sascha Wildner wrote:
> On 8/12/2010 14:52, Aggelos Economopoulos wrote:
>> That is a suboptimal approach. It should be trivial to export serno via
>> udev as Alex suggested and just as trivial to parse that (and more) info
>> from a userspace utility using libdevattr. It is generic and extendable.
>> Just try it :)
> 
> Umm, guys. What we just need to do is to compare majors/minors with a
> shell script. This would take, like, 4 lines, doesn't force me to run
> udevd, hence works in single user mode, too, can be modified without
> needing /usr/src and perhaps a couple of other advantages.
> 
> Why the complexity?

Using this mechanism you can export other kinds of information as well
(disks have lots of attributes you want to know about) in a way that
will effortlessly work across many kernel versions. I don't think
manually running udevd in single user mode is such a big deal (you could
even autostart it. You're root in single user mode). The script is also
less robust wrt hotplug events that move disks around (this isn't
realistic with physical swapping of disks, but might be an issue with
network storage).

As for modification w/o having to recompile, that /is/ a minor plus
(can't think of any reason you'd need to do that ATM but that doesn't
mean much). Though you could just hack it up from scratch on the spot if
you need a custom version that much :)

Aggelos



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