From ff71b96f4265e16f128b3aab61993daca2309211 Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Wed, 25 Mar 1998 00:20:52 +0000 Subject: added check for one more error case (This used to be commit 6cba6919ebf65691d2fb6a880da038a6dff9f6b1) --- packaging/SGI/findsmb | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'packaging') diff --git a/packaging/SGI/findsmb b/packaging/SGI/findsmb index 82aeb28dab..4cb3c80a42 100755 --- a/packaging/SGI/findsmb +++ b/packaging/SGI/findsmb @@ -65,9 +65,17 @@ foreach $ip (@ipaddrs) # loop through each IP address found @name = grep(/<00>/,@nmblookup); $_ = @name[0]; - if ($_) { # we have a netbios name - /(\S+)/; - $name = $1; + if ($_) { # we have a netbios name + if (/GROUP/) { # is it a group name + ($name, $aliases, $type, $length, @addresses) = + gethostbyaddr(pack('C4',split('\.',$ip)),2); + if (! $name) { # could not get name + $name = "unknown nis name"; + } + } else { + /(\S+)/; + $name = $1; + } # do an smbclient command on the netbios name. -- cgit