Alex

At 15:11 29.12.2003 +0100, Alex Rhomberg wrote:
>...
>> It starts its search at /, which is probably fine to detect all
>> sorts of modules in the directory tree.
>
>This obviously is the part that produces the original error message.
>
>Not looking everywhere for modules might break some setups things.
>Unfortunately, busybox find provides neither -xdev nor -prune to avoid
>looking in /proc. I suggest just throwing away find's stderr
>
>> # echo ip_conntrack_irc.o | cut -c-8
>
>> This IMHO does not enhance the chance to find the correct module and
>should > be done away with.
>
>I agree. I propose
>
>    echo -n "$module - "
>    MODTOLOAD=`find / -name $module.o 2>/dev/null | head -n 1`
>    if [ ! "$MODTOLOAD" = "" ] ;then
>      insmod $MODTOLOAD $args
>    else
>      echo "not found"
>    fi
>
>Discussion:
>- throw away error messages of find

better log them somewhere....

MODTOLOAD=`find / -name $module.o 2>/tmp/$0.log | head -n 1 ;`
[ ! -z /tmp/$0.log ] && logger $0 `cat /tmp/$0log ;`
rm -f /tmp/$0.log;

>- why the sort? doesn't make sense to me at all.

Agreed

>- I prefer head -n 1 to sed -n 1p

It is probably faster too...

>- forget the search with 8.3
>- error reporting

see above

Erich

THINK 
P�ntenstrasse 39 
8143 Stallikon 
mailto:[EMAIL PROTECTED] 
PGP Fingerprint: BC9A 25BC 3954 3BC8 C024 8D8A B7D4 FF9D 05B8 0A16




-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id78&alloc_id371&op=click

_______________________________________________
leaf-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/leaf-devel

Reply via email to