From dceb0e3adec806c7c6b9f46b6481af5dbe8a3612 Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Mon, 12 Jan 2009 11:57:18 +0000 Subject: [PATCH] Delete lm_sensors.init.suse. The actual SuSE initialization script is much different, and is maintained as part of the openSUSE sensors package. git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@5585 7894878c-1315-0410-8ee3-d5d059ff63e0 --- CHANGES | 1 + prog/init/README | 6 +- prog/init/lm_sensors.init.suse | 175 --------------------------------- 3 files changed, 2 insertions(+), 180 deletions(-) delete mode 100755 prog/init/lm_sensors.init.suse diff --git a/CHANGES b/CHANGES index b0288064..ddf65b15 100644 --- a/CHANGES +++ b/CHANGES @@ -6,6 +6,7 @@ SVN-HEAD Add support for current sensors Fix error propagation during expression evaluation Detect excessive recursion depth during expression evaluation + lm_sensors.init.suse: Delete (actual SuSE script is much different) maxilife scripts: Delete (driver never ported to Linux 2.6) sensord: Accept negative temperatures in RRD database Don't bail out on transient errors (#2330) diff --git a/prog/init/README b/prog/init/README index f3392f00..aec8cb42 100644 --- a/prog/init/README +++ b/prog/init/README @@ -1,5 +1,5 @@ This directory contains files useful for initialization -scripts, especially for RedHat and SuSE. +scripts, especially for RedHat. There are two choices, lm_sensors.init and sensord.init. Use one or the other but not both! @@ -20,10 +20,6 @@ Once the script is done detecting the hardware monitoring devices, it will list all the required modules in that file, so that they can be loaded automatically at boot time. -SuSE users will want to use lm_sensors.init.suse instead, which is -more specifically designed for this distribution. Changes were contributed -by Marc Rieffel . - ---------------- The script sensord.init also loads the modules, and then diff --git a/prog/init/lm_sensors.init.suse b/prog/init/lm_sensors.init.suse deleted file mode 100755 index 84c33ba0..00000000 --- a/prog/init/lm_sensors.init.suse +++ /dev/null @@ -1,175 +0,0 @@ -#!/bin/sh -# -### BEGIN INIT INFO -# Provides: lm_sensors -# Required-Start: $local_fs -# X-UnitedLinux-Should-Start: -# Required-Stop: $local_fs -# X-UnitedLinux-Should-Stop: -# Default-Start: 3 4 5 -# Default-Stop: 0 1 2 6 -# Short-Description: LM Sensors -# Description: LM Sensors for hardware monitoring -### END INIT INFO -# chkconfig: 2345 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 that file a shell script that simply defines the modules -# in order as normal shell variables with the special names: -# MODULE_1, MODULE_2, MODULE_3, etc. - -# If sensors isn't supported by the kernel, try loading the module... -[ -e /proc/sys/dev/sensors ] || /sbin/modprobe i2c-proc &>/dev/null - -# Don't bother if /proc/sensors still doesn't exist, kernel doesn't have -# support for sensors. -[ -e /proc/sys/dev/sensors ] || exit 0 - -# If sensors was not already running, unload the module... -[ -e /var/lock/subsys/lm_sensors ] || /sbin/modprobe -r i2c-proc &>/dev/null - -CONFIG=/etc/sysconfig/lm_sensors -PSENSORS=/usr/local/bin/sensors - -# Source function library. -#. /etc/init.d/functions - -# Shell functions sourced from /etc/rc.status: -# rc_check check and set local and overall rc status -# rc_status check and set local and overall rc status -# rc_status -v ditto but be verbose in local rc status -# rc_status -v -r ditto and clear the local rc status -# rc_status -s display "skipped" and exit with status 3 -# rc_status -u display "unused" and exit with status 3 -# rc_failed set local and overall rc status to failed -# rc_failed set local and overall rc status to -# rc_reset clear local rc status (overall remains) -# rc_exit exit appropriate to overall rc status -# rc_active checks whether a service is activated by symlinks -# rc_splash arg sets the boot splash screen to arg (if active) -. /etc/rc.status - -# Reset status of this service -rc_reset - -# Return values acc. to LSB for all commands but status: -# 0 - success -# 1 - generic or unspecified error -# 2 - invalid or excess argument(s) -# 3 - unimplemented feature (e.g. "reload") -# 4 - user had insufficient privileges -# 5 - program is not installed -# 6 - program is not configured -# 7 - program is not running -# 8--199 - reserved (8--99 LSB, 100--149 distrib, 150--199 appl) -# -# Note that starting an already running service, stopping -# or restarting a not-running service as well as the restart -# with force-reload (in case signaling is not supported) are -# considered a success. - -RETVAL=0 - -start() { - echo -n $"Starting up sensors: " - test -r "$CONFIG" && . "$CONFIG" - - modules=`grep \^MODULE_ $CONFIG | wc -l | tr -d ' '` - i=0 - while [ $i -lt $modules ] ; do - module=`eval echo '$'MODULE_$i` - echo starting module __${module}__ - /sbin/modprobe $module &>/dev/null - i=`expr $i + 1` - done - $PSENSORS -s - - RETVAL=$? - if [ $RETVAL -eq 0 ] && touch /var/lock/subsys/lm_sensors ; then - rc_status -v - else - rc_status -v - fi -} - -stop() { - echo -n $"Shutting down sensors: " - test -r "$CONFIG" && . "$CONFIG" - - modules=`grep \^MODULE_ $CONFIG | wc -l | tr -d ' '` - i=`expr $modules` - while [ $i -ge 0 ] ; do - module=`eval echo '$'MODULE_$i` - /sbin/modprobe -r $module &>/dev/null - i=`expr $i - 1` - done - /sbin/modprobe -r i2c-proc &>/dev/null - - RETVAL=$? - if [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/lm_sensors ; then - rc_status -v - else - rc_status -v - fi -} - -dostatus() { - $PSENSORS - RETVAL=$? -} - -restart() { - stop - start - RETVAL=$? -} - -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: sensors.init {start|stop|status|restart|reload|condrestart}" - exit 1 -esac - -exit $RETVAL