<NME> create_slave.sh
<BEF> #!/bin/sh

PRIVATE_KEY=$1
HOST=$2
NAME=${HOST%.buildbot}
SECRET=secret
MASTER=hs02.scs.stanford.edu:9989
BUILDDIR=/tmp/tcbuild

SSH="ssh -oStrictHostKeyChecking=no -oUserKnownHostsFile=/dev/null -i $PRIVATE_KEY root@$HOST"

echo creating buildbot $NAME on $HOST
$SSH rm -rf $BUILDDIR/buildbot.tac
$SSH mkdir -p $BUILDDIR/build/$NAME
$SSH buildbot create-slave $BUILDDIR $MASTER $NAME $SECRET && \
$SSH eval "uname -a > $BUILDDIR/info/host" && \
(echo `git config --get user.name` "<"`git config --get user.email`">" | $SSH eval "cat > $BUILDDIR/info/admin") && \
$SSH eval "cd $BUILDDIR && buildbot restart $BUILDDIR" && \
echo buildbot $NAME started on $HOST

<MSG> option to use new buildslave name for executable

<DFF> @@ -7,13 +7,14 @@ SECRET=secret
 MASTER=hs02.scs.stanford.edu:9989
 BUILDDIR=/tmp/tcbuild
 
+BUILDSLAVE=${BUILDSLAVE-buildbot} # new buildbot vers use buildslave
 SSH="ssh -oStrictHostKeyChecking=no -oUserKnownHostsFile=/dev/null -i $PRIVATE_KEY root@$HOST"
 
 echo creating buildbot $NAME on $HOST
 $SSH rm -rf $BUILDDIR/buildbot.tac
 $SSH mkdir -p $BUILDDIR/build/$NAME
-$SSH buildbot create-slave $BUILDDIR $MASTER $NAME $SECRET && \
+$SSH $BUILDSLAVE create-slave $BUILDDIR $MASTER $NAME $SECRET && \
 $SSH eval "uname -a > $BUILDDIR/info/host" && \
 (echo `git config --get user.name` "<"`git config --get user.email`">" | $SSH eval "cat > $BUILDDIR/info/admin") && \
-$SSH eval "cd $BUILDDIR && buildbot restart $BUILDDIR" && \
+$SSH eval "cd $BUILDDIR && $BUILDSLAVE restart $BUILDDIR" && \
 echo buildbot $NAME started on $HOST
\ No newline at end of file

option to use new buildslave name for executable