gate: move 'root check' to setup
Change-Id: I4d365390d673c45eb2bb1ff885ee1c74e632d5d8
This commit is contained in:
parent
a2cc27ea6a
commit
f99cb96e81
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user