[project @ peter@palfrader.org-20080930175856-yg3upk4d0bla8t45]
authorPeter Palfrader <peter@palfrader.org>
Tue, 30 Sep 2008 17:58:56 +0000 (19:58 +0200)
committerPeter Palfrader <peter@palfrader.org>
Tue, 30 Sep 2008 17:58:56 +0000 (19:58 +0200)
apt-status-check: Ignore stderr during apt-get update

dsa-nagios-nrpe-config/apt-status-check
dsa-nagios-nrpe-config/debian/changelog

index 345746a..1d4ac92 100755 (executable)
@@ -27,6 +27,7 @@ use English;
 use Getopt::Long;
 use IO::Handle;
 use IPC::Open2;
+use IPC::Open3;
 
 $ENV{'PATH'} = '/bin:/sbin:/usr/bin:/usr/sbin';
 delete @ENV{'IFS', 'CDPATH', 'ENV', 'BASH_ENV'};
@@ -45,7 +46,7 @@ sub do_check($$$$$$) {
                @command = ($APT, 'update');
                unshift @command, @$pre_command;
                $fh = new IO::Handle;
-               $pid = open2($fh, \*STDIN, @command) or die ("Cannot run $APT update in $name: $!\n");
+               $pid = open3(\*STDIN, $fh, $fh, @command) or die ("Cannot run $APT update in $name: $!\n");
                local $SIG{ALRM} = sub { die "Timeout for apt-get update.\n" };
                alarm $timeout;
                my @ignore=<$fh>;
index 2c468c3..228ae9f 100644 (file)
@@ -1,3 +1,9 @@
+dsa-nagios-nrpe-config (59) unstable; urgency=low
+
+  * apt-status-check: Ignore stderr during apt-get update.
+
+ -- Peter Palfrader <weasel@debian.org>  Tue, 30 Sep 2008 19:58:36 +0200
+
 dsa-nagios-nrpe-config (58) unstable; urgency=low
 
   * Rename dsa-check-da-in-aliases to dsa-check-config.