Merge "gate: move 'root check' to setup"

This commit is contained in:
Zuul 2017-10-03 17:07:51 +00:00 committed by Gerrit Code Review
commit 2ca580a9b4
2 changed files with 7 additions and 6 deletions

View File

@ -12,6 +12,13 @@
# See the License for the specific language governing permissions and
# limitations under the License.
set -ex
# Exit if run as root
if [[ $EUID -eq 0 ]]; then
echo "This script cannot be run as root" 1>&2
exit 1
fi
export WORK_DIR=$(pwd)
source ${WORK_DIR}/tools/gate/vars.sh
source ${WORK_DIR}/tools/gate/funcs/common.sh

View File

@ -15,12 +15,6 @@
# under the License.
set -xe
# Exit if run as root
if [[ $EUID -eq 0 ]]; then
echo "This script cannot be run as root" 1>&2
exit 1
fi
# Setup shared mounts for kubelet
sudo mkdir -p /var/lib/kubelet
sudo mount --bind /var/lib/kubelet /var/lib/kubelet