blob: b2fa87d242e762de95e36f4b3cf36a9c36c3bac7 (
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/upgradeprovision_full ]; then
$PYTHON $SRCDIR/source4/setup/provision --host-name=bar --domain=FOO --realm=foo.example.com --targetdir="$PREFIX/upgradeprovision_full" --server-role="dc"
fi
testrenamedc() {
$PYTHON $SRCDIR/source4/scripting/bin/renamedc \
--oldname="BAR" \
--newname="RAYMONBAR" \
-s $PREFIX/upgradeprovision_full/etc/smb.conf
}
testrenamedc2() {
$PYTHON $SRCDIR/source4/scripting/bin/renamedc \
--oldname="RAYMONBAR" \
--newname="BAR" \
-s $PREFIX/upgradeprovision_full/etc/smb.conf
}
testit "renamedc" testrenamedc
testit "renamedc2" testrenamedc2
if [ $failed -eq 0 ]; then
rm -rf $PREFIX/upgradeprovision_full
fi
exit $failed
|