At 06:59 PM 9/5/02 -0700, you wrote:
>Yeah, I reported the problem a couple days ago. 

I noticed your message in the web archive while searching if someone
had responded to mine...

>I like your patch better 
>than mine, though. Don't forget to patch both the start and stop loops.

oops, I just forgot about it.
I'd say that the modules should be removed from memory in the inverse
order of installation, though - modules can depend on each other.

--- sensors.orig        2002-08-23 10:48:23.000000000 +0200
+++ sensors     2002-09-06 11:28:35.000000000 +0200
@@ -42,8 +42,8 @@
        test -r "$CONFIG" && . "$CONFIG"

         modules=`grep \^MODULE_ $CONFIG | wc -l`
-        i=0
-        while [ $i -lt $modules ] ; do
+        i=1
+        while [ $i -le $modules ] ; do
                 module=`eval echo '$'MODULE_$i`
                /sbin/modprobe $module &>/dev/null
                i=`expr $i + 1`
@@ -67,11 +67,11 @@
        test -r "$CONFIG" && . "$CONFIG"

         modules=`grep \^MODULE_ $CONFIG | wc -l`
-        i=0
-        while [ $i -lt $modules ] ; do
+        i=($modules)
+        while [ $i -gt 0 ] ; do
                 module=`eval echo '$'MODULE_$i`
                /sbin/modprobe -r $module &>/dev/null
-               i=`expr $i + 1`
+               i=`expr $i - 1`
        done
        echo

Now, if you (or anyone) can explain me why it's necessary to write
i=($modules) for this code to actually work, I'll be more satisfied with
life :-)

>http://www.mandrake.com/en/archives/cooker/2002-09/msg00122.php
>
>AFAIK, it's not been fixed yet and I've not seen any response from Mandrake. 
>I'd like to chalk it up to the mailserver problems, but since the email is 
>in the archives, I think it made it through. 

Sometimes technical problems are hiding human problems :-)

Gerard


Reply via email to