Changeset 5085

Show
Ignore:
Timestamp:
12/19/07 23:39:50 (1 year ago)
Author:
khali
Message:

More system integration improvements:
* Call insserv on the lm_sensors service when present.
* No sleep before running sensors -s.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • lm-sensors/trunk/prog/detect/sensors-detect

    r5081 r5085  
    59255925      unless -f "/etc/init.d/lm_sensors"; 
    59265926 
    5927     print "You should now start the lm_sensors service to load the required\n". 
    5928           "kernel modules.\n\n"; 
     5927    if (-x "/sbin/insserv" && -f "/etc/init.d/lm_sensors") { 
     5928      system("/sbin/insserv", "/etc/init.d/lm_sensors"); 
     5929    } else { 
     5930      print "You should now start the lm_sensors service to load the required\n". 
     5931            "kernel modules.\n\n"; 
     5932    } 
    59295933  } else { 
    5930     print "To load everything that is needed, add this to e.g. /etc/rc.d/rc.local:\n\n"; 
     5934    print "To load everything that is needed, add this to one of the system\n". 
     5935          "initialization scripts (e.g. /etc/rc.d/rc.local):\n\n"; 
    59315936    print "#----cut here----\n". 
    59325937          $modprobes. 
    5933           "# sleep 2 # optional\n". 
    59345938          (-e '/usr/bin/sensors' ? 
    5935             "/usr/bin/sensors -s # recommended\n" : 
    5936             "/usr/local/bin/sensors -s # recommended\n") . 
     5939            "/usr/bin/sensors -s\n" : 
     5940            "/usr/local/bin/sensors -s\n") . 
    59375941          "#----cut here----\n\n"; 
    59385942