mdev feature request

Jason Schoon floydpink at gmail.com
Mon Sep 25 15:41:06 UTC 2006


On 9/25/06, Bernhard Fischer <rep.nop at aon.at> wrote:
>
> On Sun, Sep 24, 2006 at 07:24:34PM -0500, Jason Schoon wrote:
> >On 9/24/06, Michael-Luke Jones <jonesml at fastmail.to> wrote:
> >>
>
> I'd say the easiest way to achieve that without adding too much to the
> size of mdev is to provide something like debian's update-modules that
> does concatenate /etc/mdev.d/* into /etc/mdev.conf:
>
> cat <<-E_O_F > /etc/mdev.conf
> # Please do not edit this file directly. If you want to change or add
> # anything please take a look at the files in /etc/mdev.d and read
> # the manpage for update-mdev
> #
> E_O_F
> for cfg in /etc/mdev.d/*
> do
>   if [ -f "$cfg" ]; then
>     echo "### update-mdev: start processing $cfg"
>     if [ -x "$cfg" ]; then
>       if ! "$cfg"; then
>         echo "Error while executing $cfg" >&2
>         exit 1
>       fi
>     elif [ -e "$cfg" ]; then
>       cat $cfg
>     else
>       echo "Warning: $cfg does not exist (dangling symlink?)" >&2
>     fi
>     echo "### update-mdev: end processing $cfg"
> done >> /etc/mdev.conf
>
> or something to that effect. See update-modules for details (like arch
> specific subdirectories -- /etc/mdev.d/${ARCH}/).
>
> This would ensure that mdev stays small and you can use a configfile
> hierarchy that can be populated by your package-handling system.
>
> HTH,
> Bernhard
>

I was trying to come up with an alternative shell-script solution as well.
I like this one, but I wonder if a large number of people using mdev in
embedded systems will be using a read-only filesystem like squashfs (that's
how I use it).  In that case, creating the mdev.conf on the fly would
require a symlink out to writable area or possibly a unionfs mount.

I thought I would see how small it could be made in the code, and decide
from there if it was worth it or not.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.busybox.net/pipermail/busybox/attachments/20060925/2976f12d/attachment-0001.htm 


More information about the busybox mailing list