mdev feature request
Bernhard Fischer
rep.nop at aon.at
Tue Sep 26 08:01:59 UTC 2006
On Mon, Sep 25, 2006 at 03:52:42PM -0400, Rob Landley wrote:
>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
It's for being able to populate /etc/mdev.conf in a flexible way
(plain rulefile, script to generate a config on the fly, with
diagnostics that indicate where the rules comes from).
Up to him to decide if he can live with cat * > .conf
>does /etc/mdev.conf need the executable bit?)
What makes you believe that it does?
More information about the busybox
mailing list