projects
/
mirror
/
dsa-nagios.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[project @ peter@palfrader.org-20090203193249-w30idzor9gljzbif]
[mirror/dsa-nagios.git]
/
dsa-nagios-nrpe-config
/
apt-status-check
diff --git
a/dsa-nagios-nrpe-config/apt-status-check
b/dsa-nagios-nrpe-config/apt-status-check
index
345746a
..
1d4ac92
100755
(executable)
--- a/
dsa-nagios-nrpe-config/apt-status-check
+++ b/
dsa-nagios-nrpe-config/apt-status-check
@@
-27,6
+27,7
@@
use English;
use Getopt::Long;
use IO::Handle;
use IPC::Open2;
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'};
$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;
@command = ($APT, 'update');
unshift @command, @$pre_command;
$fh = new IO::Handle;
- $pid = open
2($fh, \*STDIN
, @command) or die ("Cannot run $APT update in $name: $!\n");
+ $pid = open
3(\*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>;
local $SIG{ALRM} = sub { die "Timeout for apt-get update.\n" };
alarm $timeout;
my @ignore=<$fh>;