4 echo "Usage: $0 SERVER USERNAME PASSWORD NET SAMBA-TOOL DNS-ZONE"
23 incdir
=$
(dirname $0)/..
/..
/..
/testprogs
/blackbox
28 $SAMBATOOL dns add
"$SERVER" -U "$USERNAME"%"$PASSWORD" \
29 _msdcs.
"$DNSZONE" _ldap._tcp.
"$SITE"._sites.
dc \
30 SRV
"mydc.$DNSZONE 389 100 100"
31 $SAMBATOOL dns add
"$SERVER" -U "$USERNAME"%"$PASSWORD" \
36 testit_grep global
10.53.57.30:389 $NET lookup ldap
"$DNSZONE" ||
37 failed
=$
(expr $failed + 1)
39 # correct site-aware lookup
40 testit_grep site-aware
1.2.3.4:389 $NET lookup ldap
"$DNSZONE" "$SITE" ||
41 failed
=$
(expr $failed + 1)
43 # lookup with nonexisting site -- global fallback
44 testit_grep global
10.53.57.30:389 $NET lookup ldap
"$DNSZONE" nosite ||
45 failed
=$
(expr $failed + 1)
47 $SAMBATOOL dns delete
"$SERVER" -U "$USERNAME"%"$PASSWORD" \
50 $SAMBATOOL dns delete
"$SERVER" -U "$USERNAME"%"$PASSWORD" \
51 _msdcs.
"$DNSZONE" _ldap._tcp.
"$SITE"._sites.
dc \
52 SRV
"mydc.$DNSZONE 389 100 100"