summaryrefslogtreecommitdiffstats
path: root/perl-install/network/smb.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/network/smb.pm')
-rw-r--r--perl-install/network/smb.pm3
1 files changed, 2 insertions, 1 deletions
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*", $_;