Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 8041a0daed03d8fcabb83ad3f9856fe1 > files > 39

keepalived-1.1.17-1mdv2010.0.i586.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