mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-07-25 11:46:34 +00:00
tests: Clarify error message and fix return codes
Reported-by: Michael J. Evans Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
This commit is contained in:
parent
177f2cd2c2
commit
c26adb8253
@ -34,15 +34,15 @@ FAIL() {
|
||||
# Only run on a normally configured ubuntu lxc system
|
||||
if [ ! -d /sys/class/net/lxcbr0 ]; then
|
||||
echo "lxcbr0 is not configured."
|
||||
exit 0
|
||||
exit 1
|
||||
fi
|
||||
if [ "$(id -u)" != "0" ]; then
|
||||
echo "Must run as root."
|
||||
exit 0
|
||||
echo "ERROR: Must run as root."
|
||||
exit 1
|
||||
fi
|
||||
if ! which host 2>&1 > /dev/null; then
|
||||
echo "'host' program not found. Please install bind9-host"
|
||||
exit 0
|
||||
exit 1
|
||||
fi
|
||||
|
||||
for template in ubuntu ubuntu-cloud; do
|
||||
|
@ -24,7 +24,7 @@
|
||||
# This test assumes an Ubuntu host
|
||||
|
||||
if [ $(id -u) -ne 0 ]; then
|
||||
echo 'run as root'
|
||||
echo "ERROR: Must run as root."
|
||||
exit 1
|
||||
fi
|
||||
which newuidmap >/dev/null 2>&1 || { echo "'newuidmap' command is missing" >&2; exit 1; }
|
||||
|
Loading…
Reference in New Issue
Block a user