--- psinib.pl 2003/07/15 17:40:32 1.9 +++ 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"); @@ -503,7 +505,7 @@ foreach my $f (sort { $file_md5{$a} cmp $file_md5{$b} } keys %file_md5) { my $dir = dirname($f); my $file = basename($f); -print "$f -- $dir / $file<--\n"; +#print "$f -- $dir / $file<--\n"; if ($dir ne $last_dir) { close($md5) if ($md5); open($md5, ">> $bc/$dir/.md5sum") || warn "can't create $bc/$dir/.md5sum: $!"; @@ -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";