From: Mahmood Naderan <nt_mahmood@yahoo.com>
To: lm-sensors@vger.kernel.org
Subject: Re: [lm-sensors] lmsensors doesn't detect core-i7 sensors
Date: Wed, 01 Sep 2010 14:58:47 +0000 [thread overview]
Message-ID: <597875.71733.qm@web50003.mail.re2.yahoo.com> (raw)
In-Reply-To: <929339.59525.qm@web50002.mail.re2.yahoo.com>
[-- Attachment #1.1: Type: text/plain, Size: 5572 bytes --]
>The current text is quite absolute ("Copy prog/init/lm_sensors.init to
>/etc/init.d/lm_sensors")
>and really invites users to overwrite the distribution specific scripts.
I really did that. See:
mahmood@localhost:~$cat /etc/init.d/lm-sensors
#!/bin/sh
#
# chkconfig: - 26 74
# description: sensors is used for monitoring motherboard sensor values.
# config: /etc/sysconfig/lm_sensors
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
# MA 02110-1301 USA.
# See also the lm_sensors homepage at:
# http://www.lm-sensors.org
# It uses a config file /etc/sysconfig/lm_sensors that contains the modules
# to be loaded/unloaded. That file is sourced into this one.
# The format of this file is a shell script that simply defines variables:
# HWMON_MODULES for hardware monitoring driver modules, and optionally
# BUS_MODULES for any required bus driver module (for example for I2C or SPI).
PSENSORS=/usr/local/bin/sensors
if [ ! -x $PSENSORS ]; then
PSENSORS=/usr/bin/sensors
fi
# Source function library.
. /etc/init.d/functions
RETVAL=0
prog="lm_sensors"
# This functions checks if sensor support is compiled into the kernel, if
# sensors are configured, and loads the config file
check_sensors() {
CONFIG=/etc/sysconfig/lm_sensors
if ! [ -r "$CONFIG" ] || ! grep '^HWMON_MODULES' $CONFIG >/dev/null
2>&1; then
echo -n "$1 $prog: not configured, run sensors-detect"
echo_warning
echo
exit 6
fi
# Load config file
. "$CONFIG"
}
start() {
check_sensors "Starting"
echo -n "Starting $prog: loading module "
for module in $BUS_MODULES $HWMON_MODULES ; do
echo -n "${module} "
/sbin/modprobe $module >/dev/null 2>&1
done
$PSENSORS -s
RETVAL=$?
if [ $RETVAL -eq 0 ] && touch /var/lock/subsys/lm_sensors ; then
echo_success
echo
else
echo_failure
echo
fi
}
stop() {
check_sensors "Stopping"
echo -n "Stopping $prog: "
for module in $HWMON_MODULES $BUS_MODULES ; do
/sbin/modprobe -r $module >/dev/null 2>&1
done
RETVAL=$?
if [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/lm_sensors ; then
echo_success
echo
else
echo_failure
echo
fi
}
dostatus() {
$PSENSORS
RETVAL=$?
if [ $RETVAL -ne 0 ]; then
RETVAL=3
fi
}
restart() {
stop
start
}
condrestart() {
[ -e /var/lock/subsys/lm_sensors ] && restart || :
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
status)
dostatus
;;
restart|reload)
restart
;;
condrestart)
condrestart
;;
*)
echo "Usage: $0 {start|stop|status|restart|reload|condrestart}"
exit 3
esac
exit $RETVAL
Do you confirm that? What should I do in order to remove lm-sensor and reinstall
it again?
// Naderan *Mahmood;
________________________________
From: Guenter Roeck <guenter.roeck@ericsson.com>
To: Jean Delvare <khali@linux-fr.org>
Cc: Mahmood Naderan <nt_mahmood@yahoo.com>; lm-sensors
<lm-sensors@lm-sensors.org>
Sent: Wed, September 1, 2010 7:02:25 PM
Subject: Re: [lm-sensors] lmsensors doesn't detect core-i7 sensors
On Wed, Sep 01, 2010 at 09:56:01AM -0400, Jean Delvare wrote:
> On Wed, 1 Sep 2010 06:26:34 -0700, Guenter Roeck wrote:
> > On Wed, Sep 01, 2010 at 04:16:41AM -0400, Mahmood Naderan wrote:
> > > >sudo /etc/init.d/lm_sensors restart
> > >
> > > mahmood@localhost:~$<mailto:mahmood@localhost:~$> sudo
>/etc/init.d/lm-sensors restart
> > > .: 39: Can't open /etc/init.d/functions
> > >
> > > Note there is no lm_sensors. I have lm-sensors
> > >
> >
> > I tried /etc/init.d/lm-sensors on a lucid (10.04) system and it works for me.
>It looks like
> > you overwrote the original version of /etc/init.d/lm-sensors with
>prog/init.d/lm_sensors.
> > That won't work - prog/init.d/lm_sensors does not work with lucid. You'll
>need to reinstall
> > the original version of /etc/init.d/lm-sensors and try again.
>
> I proposed once to delete these initialization scripts from our
> repository as they are quite distribution specific, but the few votes
> were not in my favor.
>
How about some kind of warning, or at least use different wording in
sensors-detect ?
The current text is quite absolute ("Copy prog/init/lm_sensors.init to
/etc/init.d/lm_sensors")
and really invites users to overwrite the distribution specific scripts.
Guenter
[-- Attachment #1.2: Type: text/html, Size: 11921 bytes --]
[-- Attachment #2: Type: text/plain, Size: 153 bytes --]
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
next prev parent reply other threads:[~2010-09-01 14:58 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-01 6:38 [lm-sensors] lmsensors doesn't detect core-i7 sensors Mahmood Naderan
2010-09-01 7:19 ` Nikola Pajkovsky
2010-09-01 7:30 ` Mahmood Naderan
2010-09-01 7:38 ` Nikola Pajkovsky
2010-09-01 7:46 ` Mahmood Naderan
2010-09-01 7:53 ` Nikola Pajkovsky
2010-09-01 8:03 ` Mahmood Naderan
2010-09-01 8:11 ` Nikola Pajkovsky
2010-09-01 8:16 ` Mahmood Naderan
2010-09-01 13:26 ` Guenter Roeck
2010-09-01 13:56 ` Jean Delvare
2010-09-01 14:32 ` Guenter Roeck
2010-09-01 14:58 ` Mahmood Naderan [this message]
2010-09-01 15:52 ` Guenter Roeck
2010-09-01 16:57 ` Mahmood Naderan
2010-09-03 14:31 ` Guenter Roeck
2010-09-04 13:49 ` Jean Delvare
2010-09-04 14:25 ` Guenter Roeck
2010-09-04 14:31 ` Mahmood Naderan
2010-09-04 15:55 ` Jean Delvare
2010-09-04 17:28 ` Guenter Roeck
2010-09-06 16:18 ` Jean Delvare
2010-09-07 1:32 ` Guenter Roeck
2010-09-07 8:00 ` Jean Delvare
2010-09-13 8:04 ` Mahmood Naderan
2010-09-14 16:20 ` Guenter Roeck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=597875.71733.qm@web50003.mail.re2.yahoo.com \
--to=nt_mahmood@yahoo.com \
--cc=lm-sensors@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.