diff options
Diffstat (limited to 'packaging/Caldera/UnixWare/findsmb')
-rwxr-xr-x | packaging/Caldera/UnixWare/findsmb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/packaging/Caldera/UnixWare/findsmb b/packaging/Caldera/UnixWare/findsmb index c87fdb5190a..04bc6080508 100755 --- a/packaging/Caldera/UnixWare/findsmb +++ b/packaging/Caldera/UnixWare/findsmb @@ -1,4 +1,4 @@ -#!/usr/local/bin/perl +#!/usr/bin/perl # # Prints info on all smb responding machines on a subnet. # This script needs to be run on a machine without nmbd running and be @@ -15,7 +15,7 @@ # that workgroup. # -$SAMBABIN = "/usr/local/samba/bin"; +$SAMBABIN = "/usr/bin"; for ($i = 0; $i < 2; $i++) { # test for -d option and broadcast address $_ = shift; @@ -73,6 +73,9 @@ foreach $ip (@ipaddrs) # loop through each IP address found $name = "unknown nis name"; } } else { +# The Netbios name can contain lot of characters also '<' '>' +# and spaces. The follwing cure inside name space but not +# names starting or ending with spaces /(.{1,15})\s+<00>\s+/; $name = $1; } @@ -103,6 +106,7 @@ foreach $ip (@ipaddrs) # loop through each IP address found @name = grep(/<00> - <GROUP>/,@nmblookup); $_ = @name[0]; if ($_) { +# Same as before for space and characters /(.{1,15})\s+<00>\s+/; $_ = "[$1]"; } else { |