lib/param: Set s4 "host msdfs = true" by default
[kai/samba.git] / testprogs / blackbox / renamedc.sh
1 #!/bin/sh
2
3 if [ $# -lt 1 ]; then
4 cat <<EOF
5 Usage: renamedc.sh PREFIX
6 EOF
7 exit 1;
8 fi
9
10 PREFIX="$1"
11 shift 1
12
13 . `dirname $0`/subunit.sh
14
15 if [ ! -d $PREFIX/upgradeprovision_full ]; then
16         $PYTHON $SRCDIR/source4/setup/provision --host-name=bar --domain=FOO --realm=foo.example.com --targetdir="$PREFIX/upgradeprovision_full" --server-role="dc"
17 fi
18
19
20 testrenamedc() {
21         $PYTHON $SRCDIR/source4/scripting/bin/renamedc \
22                 --oldname="BAR" \
23                 --newname="RAYMONBAR" \
24                 -s $PREFIX/upgradeprovision_full/etc/smb.conf
25 }
26
27
28 testrenamedc2() {
29         $PYTHON $SRCDIR/source4/scripting/bin/renamedc \
30                 --oldname="RAYMONBAR" \
31                 --newname="BAR" \
32                 -s $PREFIX/upgradeprovision_full/etc/smb.conf
33 }
34
35 testit "renamedc" testrenamedc
36 testit "renamedc2" testrenamedc2
37
38 if [ $failed -eq 0 ]; then
39         rm -rf $PREFIX/upgradeprovision_full
40 fi
41
42 exit $failed