build_lxc.sh needs to be root to run

This commit is contained in:
Jesse Andrews 2011-09-28 18:29:50 -07:00
parent f2d6c92bb5
commit 46ad2de5d9

View file

@ -1,5 +1,16 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Sanity check
if [ "$EUID" -ne "0" ]; then
echo "This script must be run with root privileges."
exit 1
fi
# Warn users who aren't on natty
if ! grep -q natty /etc/lsb-release; then
echo "WARNING: this script has only been tested on natty"
fi
# Source params # Source params
source ./stackrc source ./stackrc
@ -23,10 +34,6 @@ STACKSH_PARAMS=${STACKSH_PARAMS:-}
# Option to use the version of devstack on which we are currently working # Option to use the version of devstack on which we are currently working
USE_CURRENT_DEVSTACK=${USE_CURRENT_DEVSTACK:-1} USE_CURRENT_DEVSTACK=${USE_CURRENT_DEVSTACK:-1}
# Warn users who aren't on natty
if ! grep -q natty /etc/lsb-release; then
echo "WARNING: this script has only been tested on natty"
fi
# Install deps # Install deps
apt-get install -y lxc debootstrap apt-get install -y lxc debootstrap