mirror of
https://github.com/lm-sensors/lm-sensors
synced 2025-09-01 06:45:24 +00:00
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
This commit is contained in:
@@ -5713,6 +5713,11 @@ sub main
|
|||||||
exit -1;
|
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_kernel_version();
|
||||||
initialize_conf;
|
initialize_conf;
|
||||||
initialize_proc_pci;
|
initialize_proc_pci;
|
||||||
@@ -5988,6 +5993,11 @@ EOT
|
|||||||
|
|
||||||
if (-x "/sbin/insserv" && -f "/etc/init.d/lm_sensors") {
|
if (-x "/sbin/insserv" && -f "/etc/init.d/lm_sensors") {
|
||||||
system("/sbin/insserv", "/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 {
|
} else {
|
||||||
print "You should now start the lm_sensors service to load the required\n".
|
print "You should now start the lm_sensors service to load the required\n".
|
||||||
"kernel modules.\n\n";
|
"kernel modules.\n\n";
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#
|
#
|
||||||
# chkconfig: 2345 26 74
|
# chkconfig: - 26 74
|
||||||
# description: sensors is used for monitoring motherboard sensor values.
|
# description: sensors is used for monitoring motherboard sensor values.
|
||||||
# config: /etc/sysconfig/lm_sensors
|
# config: /etc/sysconfig/lm_sensors
|
||||||
#
|
#
|
||||||
|
Reference in New Issue
Block a user