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