All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans de Goede <j.w.r.degoede@hhs.nl>
To: lm-sensors@vger.kernel.org
Subject: [lm-sensors] Patch: don't start initscript by default on chkconfig
Date: Mon, 11 Feb 2008 13:18:20 +0000	[thread overview]
Message-ID: <47B04B1C.9070405@hhs.nl> (raw)

[-- Attachment #1: Type: text/plain, Size: 361 bytes --]

Hi All,

The attached patch modifies the initscript included with lm_sensors so that it 
doesn't start by default on chkconfig using systems.

The patch also modifies sensors-detect to activate the initscript once 
lm_sensors has been successfully configured.

If I don't get any objections I will be committing this to svn in a couple of days.

Regards,

Hans

[-- Attachment #2: lm_sensors-2.10.4-service-default-off.patch --]
[-- Type: text/x-patch, Size: 1378 bytes --]

diff -up lm_sensors-3.0.1/prog/detect/sensors-detect.foo lm_sensors-3.0.1/prog/detect/sensors-detect
--- lm_sensors-3.0.1/prog/detect/sensors-detect.foo	2008-01-22 13:22:47.000000000 +0100
+++ lm_sensors-3.0.1/prog/detect/sensors-detect	2008-02-11 13:42:04.000000000 +0100
@@ -5943,6 +5943,15 @@ EOT
 
     if (-x "/sbin/insserv" && -f "/etc/init.d/lm_sensors") {
       system("/sbin/insserv", "/etc/init.d/lm_sensors");
+    } elsif (-x "/sbin/chkconfig" && -f "/etc/init.d/lm_sensors") {
+      system("/sbin/chkconfig", "lm_sensors", "on");
+      if (-x "/sbin/service") {
+        if (-f "/var/lock/subsys/lm_sensors") {
+          system("/sbin/service", "lm_sensors", "restart");
+        } else {
+          system("/sbin/service", "lm_sensors", "start");
+        }
+      }
     } else {
       print "You should now start the lm_sensors service to load the required\n".
             "kernel modules.\n\n";
diff -up lm_sensors-3.0.1/prog/init/lm_sensors.init.foo lm_sensors-3.0.1/prog/init/lm_sensors.init
--- lm_sensors-3.0.1/prog/init/lm_sensors.init.foo	2007-04-27 14:34:17.000000000 +0200
+++ lm_sensors-3.0.1/prog/init/lm_sensors.init	2008-02-11 13:08:58.000000000 +0100
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# chkconfig: 2345 26 74
+# chkconfig: - 26 74
 # description: sensors is used for monitoring motherboard sensor values.
 # config: /etc/sysconfig/lm_sensors
 #

[-- Attachment #3: Type: text/plain, Size: 153 bytes --]

_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

             reply	other threads:[~2008-02-11 13:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-11 13:18 Hans de Goede [this message]
2008-02-13 13:03 ` [lm-sensors] Patch: don't start initscript by default on Jean Delvare
2008-02-26 14:11 ` Hans de Goede

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=47B04B1C.9070405@hhs.nl \
    --to=j.w.r.degoede@hhs.nl \
    --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.