From d1554215425148458eae4ed1f37c20f93ab67014 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Wed, 12 Mar 2008 20:50:19 +0000 Subject: [PATCH] Modify initscript chkconfig comments to not make the service start by default, modify sensors-detect to enable the service on boot once configured and to start it at the end of sensors-detect git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@5143 7894878c-1315-0410-8ee3-d5d059ff63e0 --- prog/detect/sensors-detect | 10 ++++++++++ prog/init/lm_sensors.init | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/prog/detect/sensors-detect b/prog/detect/sensors-detect index 8b51963b..ea8c7d47 100755 --- a/prog/detect/sensors-detect +++ b/prog/detect/sensors-detect @@ -5713,6 +5713,11 @@ sub main exit -1; } + if (-x "/sbin/service" && -f "/etc/init.d/lm_sensors" && + -f "/var/lock/subsys/lm_sensors") { + system("/sbin/service", "lm_sensors", "stop"); + } + initialize_kernel_version(); initialize_conf; initialize_proc_pci; @@ -5988,6 +5993,11 @@ 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") { + 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 --git a/prog/init/lm_sensors.init b/prog/init/lm_sensors.init index e9454359..39e12528 100755 --- a/prog/init/lm_sensors.init +++ b/prog/init/lm_sensors.init @@ -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 #