Sophie

Sophie

distrib > Mandriva > current > x86_64 > by-pkgid > d8a898ad2571c1162632b4c885b7261d > files > 39

keepalived-1.1.17-2mdv2010.1.x86_64.rpm

#!/bin/sh
# remove it as smbcheck.sh and put it the location you want

SAMBA_BIN=`which smbclient 2> /dev/null`

if [ -z "$SAMBA_BIN" ] ; then
	exit 2
fi

if [ -z "$1" ] ; then
	echo "Usage: $0 <ip address>"
	exit 2
fi 

($SAMBA_BIN -N -L $1 -W CENTRALB -U nobody) \
 | egrep '^Domain=\[[A-Za-z0-9_-]+\]' > /dev/null 2>&1