ldb: Add ldbdump, based on tdbdump
[Samba.git] / testprogs / blackbox / renamedc.sh
blob2eab85e6e92a9dbbc66eb00c3e19b97662554bc6
1 #!/bin/sh
3 if [ $# -lt 1 ]; then
4 cat <<EOF
5 Usage: renamedc.sh PREFIX
6 EOF
7 exit 1;
8 fi
10 PREFIX="$1"
11 shift 1
13 . `dirname $0`/subunit.sh
15 if [ ! -d $PREFIX/renamedc_test ]; then
16 $PYTHON $BINDIR/samba-tool domain provision --host-name=bar --domain=FOO --realm=foo.example.com --targetdir="$PREFIX/renamedc_test" --server-role="dc" --use-ntvfs
20 testrenamedc() {
21 $PYTHON $SRCDIR/source4/scripting/bin/renamedc \
22 --oldname="BAR" \
23 --newname="RAYMONBAR" \
24 -s $PREFIX/renamedc_test/etc/smb.conf
28 testrenamedc2() {
29 $PYTHON $SRCDIR/source4/scripting/bin/renamedc \
30 --oldname="RAYMONBAR" \
31 --newname="BAR" \
32 -s $PREFIX/renamedc_test/etc/smb.conf
35 testit "renamedc" testrenamedc
36 testit "renamedc2" testrenamedc2
38 if [ $failed -eq 0 ]; then
39 rm -rf $PREFIX/renamedc_test
42 exit $failed