~ubuntu-branches/ubuntu/natty/munin/natty

« back to all changes in this revision

Viewing changes to debian/patches/320-sensors_fix

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short, Nathan Handler
  • Date: 2008-07-21 12:50:17 UTC
  • Revision ID: james.westby@ubuntu.com-20080721125017-d3vhpcbhon3l5551
Tags: 1.2.6-4ubuntu1
* Merge from debian unstable, remaining changes:
  + debian/munin-node.postinst:
    - Restart munin-node to load new plugins. (LP: #224428)
  + debian/control:
    - Suggest cron (LP: #220561)
  + Updated debian/patches/221-apt-ubuntu-changes.patch:
    - Make apt_all.in Ubuntu specific. Thanks to Soren Hansen.

 [Nathan Handler]
 - Fix typo in debian/munin-node.postinst (LP: #247806)
 - Fixed missing semi-colon in node/munin-node.in (LP: #247805)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Index: munin-1.2.6/node/node.d.linux/sensors_.in
 
2
===================================================================
 
3
--- munin-1.2.6.orig/node/node.d.linux/sensors_.in      2008-07-21 00:11:47.000000000 +0200
 
4
+++ munin-1.2.6/node/node.d.linux/sensors_.in   2008-07-21 00:13:41.000000000 +0200
 
5
@@ -88,7 +88,7 @@
 
6
 
 
7
 if ( defined $ARGV[0] and $ARGV[0] eq 'autoconf' ) {
 
8
   # Now see if "sensors" can run
 
9
-  my $text = `$SENSORS`;
 
10
+  my $text = `$SENSORS 2>/dev/null`;
 
11
   if ($?) {
 
12
     if ($? == -1) {
 
13
       print "no (program $SENSORS not found)\n";
 
14
@@ -108,7 +108,16 @@
 
15
 }
 
16
 
 
17
 if (defined $ARGV[0] and $ARGV[0] eq 'suggest') {
 
18
-  my $text = `$SENSORS`;
 
19
+  my $text = `$SENSORS 2>/dev/null`;
 
20
+  if ($?) {
 
21
+    if ($? == -1) {
 
22
+      print "no (program $SENSORS not found)\n";
 
23
+    } else {
 
24
+      print "no (program $SENSORS died)\n";
 
25
+    }
 
26
+    exit 1;
 
27
+  }
 
28
+
 
29
   foreach my $func (keys %config) {
 
30
     print $func, "\n" if $text =~ $config{$func}->{regex};
 
31
   }