mdev feature request

Rob Landley rob at landley.net
Mon Sep 25 19:52:42 UTC 2006


On Monday 25 September 2006 3:35 am, Bernhard Fischer 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}/).

Ok, if you have nested subdirectories:

  find /etc/mdev.d | xargs cat > /etc/mdev.conf

I didn't think he had nested subdirectories, in which case:

  cat /etc/mdev.d/* > /etc/mdev.conf

Should work fine.  (What's the shell script for?  Since when 
does /etc/mdev.conf need the executable bit?)

Rob
-- 
Never bet against the cheap plastic solution.



More information about the busybox mailing list