fix vm build on Ubuntu 16.04

This commit is contained in:
j 2016-03-15 23:04:53 +01:00
commit e16310062b
2 changed files with 38 additions and 17 deletions

View file

@ -10,6 +10,10 @@ if [ "$MIRROR" = "" ]; then
MIRROR="--mirror http://archive.ubuntu.com/ubuntu/"
fi
if [ -e "$BASE/settings.sh" ]; then
. "$BASE/settings.sh"
fi
if [ $(id -u) -ne 0 ]; then
echo "you need to run $0 as root"
exit 1
@ -18,12 +22,18 @@ fi
# make sure ubuntu-archive-keyring is installed
test -e /usr/share/keyrings/ubuntu-archive-keyring.gpg || apt-get install ubuntu-archive-keyring
vmdebootstrap=`vmdebootstrap --version`
if [[ $vmdebootstrap == "1.4" ]]; then
EXTRA=--no-systemd-networkd
fi
vmdebootstrap \
--image ${TARGET}.img \
--size ${SIZE} \
--sparse \
--distribution=${RELEASE} \
$MIRROR \
$EXTRA \
--enable-dhcp \
--no-serial-console \
--no-kernel \