diff options
author | Jeremy Allison <jra@samba.org> | 2002-02-01 22:59:07 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2002-02-01 22:59:07 +0000 |
commit | 7a40b40ebf4a5fe744d89a07408cc62539e3e558 (patch) | |
tree | f62d5961423abd6408cd06cda7ae06f81a2bd9a9 /packaging/PHT | |
parent | 4bfb8d602651f0bacbdcefef1005390277f8a056 (diff) | |
download | samba-7a40b40ebf4a5fe744d89a07408cc62539e3e558.tar.gz samba-7a40b40ebf4a5fe744d89a07408cc62539e3e558.tar.xz samba-7a40b40ebf4a5fe744d89a07408cc62539e3e558.zip |
Merge for release.
Jeremy
Diffstat (limited to 'packaging/PHT')
-rwxr-xr-x | packaging/PHT/TurboLinux/findsmb | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/packaging/PHT/TurboLinux/findsmb b/packaging/PHT/TurboLinux/findsmb index 986c2481779..fb178f91c1c 100755 --- a/packaging/PHT/TurboLinux/findsmb +++ b/packaging/PHT/TurboLinux/findsmb @@ -63,8 +63,17 @@ foreach $ip (@ipaddrs) # loop through each IP address found # get the first <00> name - @name = grep(/<00>/,@nmblookup); + @name = grep(/<00> - /,@nmblookup); $_ = @name[0]; + if (not $_) { +# try without the -r option + open(NMBLOOKUP,"$SAMBABIN/nmblookup -A $ip|") || + die("Can't get nmb name list.\n"); + @nmblookup = <NMBLOOKUP>; + close NMBLOOKUP; + @name = grep(/<00> - /,@nmblookup); + $_ = @name[0]; + } if ($_) { # we have a netbios name if (/GROUP/) { # is it a group name ($name, $aliases, $type, $length, @addresses) = @@ -79,7 +88,7 @@ foreach $ip (@ipaddrs) # loop through each IP address found # do an smbclient command on the netbios name. - open(SMB,"$SAMBABIN/smbclient -N -L $name -I $ip -U% |") || + open(SMB,"$SAMBABIN/smbclient -N -L '$name' -I $ip -U% |") || die("Can't do smbclient command.\n"); @smb = <SMB>; close SMB; @@ -95,7 +104,7 @@ foreach $ip (@ipaddrs) # loop through each IP address found @info = grep(/OS=/,@smb); $_ = @info[0]; if ($_) { # we found response - s/Domain=|OS=|Server=|\n//g; # strip out descriptions to make line shorter + s/.*Domain=|OS=|Server=|\n//g; # strip out descriptions to make line shorter } else { # no OS= string in response (WIN95 client) |