attempt to unbreak build bots

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@359404 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/utils/docker/debian9/Dockerfile b/utils/docker/debian9/Dockerfile
index 1dfeb06..4530a70 100644
--- a/utils/docker/debian9/Dockerfile
+++ b/utils/docker/debian9/Dockerfile
@@ -36,8 +36,10 @@
       software-properties-common \
       gnupg \
       apt-transport-https \
+      sudo \
       systemd \
-      sysvinit-utils && \
+      sysvinit-utils \
+      systemd-sysv && \
   update-alternatives --install "/usr/bin/ld" "ld" "/usr/bin/ld.gold" 20 && \
   update-alternatives --install "/usr/bin/ld" "ld" "/usr/bin/ld.bfd" 10 && \
   rm -rf /var/lib/apt/lists/*
@@ -166,7 +168,6 @@
     apt-get install -y --no-install-recommends \
     bash-completion \
     vim \
-    systemd-sysv \
     buildbot-slave \
   && rm -rf /var/lib/apt/lists/*
 
diff --git a/utils/docker/scripts/run_buildbot_new.sh b/utils/docker/scripts/run_buildbot_new.sh
index 3f21b90..92ec2ab 100755
--- a/utils/docker/scripts/run_buildbot_new.sh
+++ b/utils/docker/scripts/run_buildbot_new.sh
@@ -15,6 +15,8 @@
 apt-get update -y
 apt-get upgrade -y
 
+apt-get install sudo -y
+
 # FIXME(EricWF): Remove this hack. It's only in place to temporarily fix linking libclang_rt from the
 # debian packages.
 # WARNING: If you're not a buildbot, DO NOT RUN!
@@ -67,7 +69,7 @@
   local BOT_DIR=$BOT_ROOT/b$N
   local BOT_NAME=$BOT_ROOT_NAME$N
   setup_numbered_bot $BOT_NAME $BOT_DIR
-  /usr/bin/buildslave start $BOT_DIR
+  sudo -u buildbot /usr/bin/buildslave start $BOT_DIR
 
   sleep 30
   cat /tmp/twistd.log
@@ -82,8 +84,7 @@
   exit 1
 }
 
-
-for N in 1 2 3 4 5
+for N in `shuf -i 1-5`
 do
   if try_start_builder $N; then
     break