From: Andrew Tridgell Date: Sat, 12 Sep 2009 06:08:07 +0000 (+1000) Subject: s4-scripts: allow setup_dns.sh to take a PRIVATEDIR X-Git-Tag: talloc-2.0.1~520^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0be268bf5538dcf57f9534d864be1960dfab0f72;p=thirdparty%2Fsamba.git s4-scripts: allow setup_dns.sh to take a PRIVATEDIR --- diff --git a/source4/scripting/bin/setup_dns.sh b/source4/scripting/bin/setup_dns.sh index e6a42811b8e..f296de2b8e7 100755 --- a/source4/scripting/bin/setup_dns.sh +++ b/source4/scripting/bin/setup_dns.sh @@ -12,7 +12,9 @@ IP="$3" RSUFFIX=$(echo $DOMAIN | sed s/[\.]/,DC=/g) -PRIVATEDIR=$(bin/testparm --section-name=global --parameter-name='private dir' --suppress-prompt 2> /dev/null) +[ -z "$PRIVATEDIR" ] && { + PRIVATEDIR=$(bin/testparm --section-name=global --parameter-name='private dir' --suppress-prompt 2> /dev/null) +} OBJECTGUID=$(bin/ldbsearch -H "$PRIVATEDIR/sam.ldb" -b "CN=NTDS Settings,CN=$HOSTNAME,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=$RSUFFIX" objectguid|grep ^objectGUID| cut -d: -f2)