summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-02-13 13:05:59 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-02-13 13:05:59 +0000
commit40e9fab046aeb073b1f7caffea541a090d24606a (patch)
treeaf4b15da558260f2618f5ce60419d643b2dd66a6 /perl-install
parent532caa54505b1ff0d9aabf32340bca90451e90c7 (diff)
downloaddrakx-backup-do-not-use-40e9fab046aeb073b1f7caffea541a090d24606a.tar
drakx-backup-do-not-use-40e9fab046aeb073b1f7caffea541a090d24606a.tar.gz
drakx-backup-do-not-use-40e9fab046aeb073b1f7caffea541a090d24606a.tar.bz2
drakx-backup-do-not-use-40e9fab046aeb073b1f7caffea541a090d24606a.tar.xz
drakx-backup-do-not-use-40e9fab046aeb073b1f7caffea541a090d24606a.zip
$server->{ip} is no more mandatory
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/network/nfs.pm3
-rw-r--r--perl-install/network/smb.pm3
2 files changed, 4 insertions, 2 deletions
diff --git a/perl-install/network/nfs.pm b/perl-install/network/nfs.pm
index 5f381d1c1..859e1e63d 100644
--- a/perl-install/network/nfs.pm
+++ b/perl-install/network/nfs.pm
@@ -43,7 +43,8 @@ sub find_exports {
my ($server) = @_;
local *F;
- my $pid = open F, "showmount -e $server->{ip} |";
+ my $s = $server->{ip} || $server->{name};
+ my $pid = open F, "showmount -e $s |";
$SIG{ALRM} = sub { kill(15, $pid) };
alarm 5;
diff --git a/perl-install/network/smb.pm b/perl-install/network/smb.pm
index 350399797..2cb8ce9ae 100644
--- a/perl-install/network/smb.pm
+++ b/perl-install/network/smb.pm
@@ -44,12 +44,13 @@ sub find_exports {
my ($server) = @_;
my @l;
my $name = $server->{name} || $server->{ip};
+ my $ip = $server->{ip} ? "-I $server->{ip}" : '';
my $group = $server->{group} ? " -W $server->{group}" : '';
# WARNING: using smbclient -L is ugly. It can't handle more than 15
# characters shared names
- foreach (`smbclient -U% -L $name -I $server->{ip}$group`) {
+ foreach (`smbclient -U% -L $name $ip$group`) {
chomp;
s/^\t//;
my ($name, $type, $comment) = unpack "A15 A10 A*", $_;