--- psinib.pl 2003/07/15 17:41:45 1.10 +++ psinib.pl 2003/10/12 15:58:28 1.11 @@ -81,7 +81,7 @@ next if !/^\s*smbmount\s/; my (undef,$share,undef,$opt) = split(/\s+/,$_,4); - my ($user,$passwd,$workgroup); + my ($user,$passwd,$workgroup,$ip); foreach (split(/,/,$opt)) { my ($n,$v) = split(/=/,$_,2); @@ -97,6 +97,8 @@ } } elsif ($n =~ m#workgroup#i) { $workgroup = $v; + } elsif ($n =~ m#ip#i) { + $ip = $v; } } @@ -121,8 +123,8 @@ print "working on $share\n"; - - my $ip = get_ip($share); + # try to nmblookup IP + $ip = get_ip($share) if (! $ip); if ($ip) { xlog($share,"IP is $ip"); @@ -512,7 +514,7 @@ } print $md5 $file_md5{$f}," $file\n"; } - close($md5); + close($md5) if ($md5); # create leatest link #print "ln -s $bc $real_bl\n";