MottS Posted April 5, 2003 Report Share Posted April 5, 2003 When I shutdown my computer, there is some errors when lm_sensors shut down. Here is the 'stop' part of the /etc/init.d/lm_sensors script. What is wrong? ... Basically the system complains about '-ge' .. stop) # Stop daemons. gprintf "Shutting down sensord: " killproc sensord echo gprintf "Removing sensors modules: " test -r "$CONFIG" && . "$CONFIG" modules=`grep ^MODULE_ $CONFIG | wc -l` i=`expr$Pmodules` while [ $i -ge 0 ]; do module=`eval echo '$'MODULE_$i` /sbin/modprobe -r $module &>/dev/null i=`expr $i - 1` done echo rm -f /var/lock/subsys/lm_sensors ;; Thx! MOttS Quote Link to comment Share on other sites More sharing options...
aru Posted April 5, 2003 Report Share Posted April 5, 2003 Provided that I cannot access the full script, i=`expr$Pmodules` shouldn't it be i=`expr $modules` because expr itself is a command, $P isn't anywere, and modules is or should be a numerical variable set just one line above. If the i= assignation fails, later the [ $i -ge 0 ] will complain about -ge and something like "unary operator expected" Quote Link to comment Share on other sites More sharing options...
MottS Posted April 6, 2003 Author Report Share Posted April 6, 2003 aru.. you are right! I put i=`expr $modules' instead of i=`expr$Pmodules` and lm_sensors stoped properly. So there is a mistake in /etc/init.d/lm_sensors script. That's funny.. it's like they wrote it without even testing it. Thank you very much !!!!!!!!!!!! MOttS Quote Link to comment Share on other sites More sharing options...
aru Posted April 6, 2003 Report Share Posted April 6, 2003 You're wellcome :D Quote Link to comment Share on other sites More sharing options...
Relic2K Posted April 7, 2003 Report Share Posted April 7, 2003 Just out of curiousity, with Mandrake 9/9.1 has either of you ran the following ? "#usr/sbin/sensors-detect" command ? This does everything for you and you don't have to edit any scripts manually. I used this for the last two installs vice manually setting up scripts like was given in the TUTs. You may already know this but I just thought I would provide some input. Quote Link to comment Share on other sites More sharing options...
MottS Posted April 7, 2003 Author Report Share Posted April 7, 2003 Hi Relic2k To configure lm_sensors on my computer, I basically run that script (sensors-detect). This created /etc/sysconfig/lm_sensor and all the others needed scripts for lm_sensor to run. However, /etc/init.d/lm_sensor had the above error making 'service sensors stop' return errors. So you are right, I should have write it.. I have run 'sensors-detect' and modified /etc/init.d/lm_sensor so that lm_sensor works correctly. Regards, MottS Quote Link to comment Share on other sites More sharing options...
Relic2K Posted April 7, 2003 Report Share Posted April 7, 2003 Hi Relic2k To configure lm_sensors on my computer, I basically run that script (sensors-detect). This created /etc/sysconfig/lm_sensor and all the others needed scripts for lm_sensor to run. However, /etc/init.d/lm_sensor had the above error making 'service sensors stop' return errors. So you are right, I should have write it.. I have run 'sensors-detect' and modified /etc/init.d/lm_sensor so that lm_sensor works correctly. Regards, MottS K Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.