summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-01-27 19:30:48 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-01-27 19:30:48 +0000
commit258b4c29d59ce9d701a46c98f663c2ea961288ba (patch)
tree5999fe354b5386c87eb8dc3bd0ec89a3b9a6256e /perl-install
parent328d50a5e7d682cc62da7186a5d3e03dc5fe1362 (diff)
downloaddrakx-backup-do-not-use-258b4c29d59ce9d701a46c98f663c2ea961288ba.tar
drakx-backup-do-not-use-258b4c29d59ce9d701a46c98f663c2ea961288ba.tar.gz
drakx-backup-do-not-use-258b4c29d59ce9d701a46c98f663c2ea961288ba.tar.bz2
drakx-backup-do-not-use-258b4c29d59ce9d701a46c98f663c2ea961288ba.tar.xz
drakx-backup-do-not-use-258b4c29d59ce9d701a46c98f663c2ea961288ba.zip
find_exports: add a timeout
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/network/nfs.pm9
1 files changed, 7 insertions, 2 deletions
diff --git a/perl-install/network/nfs.pm b/perl-install/network/nfs.pm
index dd841c5bf..5f381d1c1 100644
--- a/perl-install/network/nfs.pm
+++ b/perl-install/network/nfs.pm
@@ -22,7 +22,7 @@ sub check {
sub find_servers() {
- local (*F, $_);
+ local *F;
my $pid = open F, "rpcinfo-flushed -b mountd 2 |";
$SIG{ALRM} = sub { kill(15, $pid) };
alarm 1;
@@ -42,7 +42,12 @@ sub find_servers() {
sub find_exports {
my ($server) = @_;
- my (undef, @l) = `showmount -e $server->{ip}`;
+ local *F;
+ my $pid = open F, "showmount -e $server->{ip} |";
+ $SIG{ALRM} = sub { kill(15, $pid) };
+ alarm 5;
+
+ my (undef, @l) = <F>;
map { /(\S+)\s*(\S+)/; { name => $1, comment => $2 } } @l;
}