From: Vaidas Kascėnas Date: Wed, 6 Jan 2016 17:46:33 +0000 (+0200) Subject: Update lxc-ubuntu.in X-Git-Tag: lxc-2.0.0.beta2~20^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=88753f7abfe702d2e2a1a4e3f3ed0f7c0a48415f;p=thirdparty%2Flxc.git Update lxc-ubuntu.in Updated as per request in https://github.com/lxc/lxc/pull/740#discussion-diff-48759756 Signed-off-by: Vaidas Kascėnas vaidas@kascenas.lt --- diff --git a/templates/lxc-ubuntu.in b/templates/lxc-ubuntu.in index 741ad7d10..9f2150ae5 100644 --- a/templates/lxc-ubuntu.in +++ b/templates/lxc-ubuntu.in @@ -332,6 +332,7 @@ download_ubuntu() release=$3 packages_template=${packages_template:-"ssh,vim"} + debootstrap_parameters= # Try to guess a list of langpacks to install langpacks="language-pack-en" @@ -343,7 +344,10 @@ download_ubuntu() fi packages_template="${packages_template},$(echo $langpacks | sed 's/ /,/g')" - if [ $variant == 'minbase' ]; then + if [ -n "$variant" ]; then + debootstrap_parameters="$debootstrap_parameters --variant=$variant" + fi + if [ $variant = 'minbase' ]; then packages_template="${packages_template},sudo,ifupdown,isc-dhcp-client" fi @@ -361,9 +365,9 @@ download_ubuntu() # download a mini ubuntu into a cache echo "Downloading ubuntu $release minimal ..." if [ -n "$(which qemu-debootstrap)" ]; then - qemu-debootstrap --verbose $(if [ -n "$variant" ]; then echo --variant="$variant"; fi) --components=main,universe --arch=$arch --include=${packages_template} $release $cache/partial-$arch $MIRROR + qemu-debootstrap --verbose $debootstrap_parameters --components=main,universe --arch=$arch --include=${packages_template} $release $cache/partial-$arch $MIRROR else - debootstrap --verbose $(if [ -n "$variant" ]; then echo --variant="$variant"; fi) --components=main,universe --arch=$arch --include=${packages_template} $release $cache/partial-$arch $MIRROR + debootstrap --verbose $debootstrap_parameters --components=main,universe --arch=$arch --include=${packages_template} $release $cache/partial-$arch $MIRROR fi if [ $? -ne 0 ]; then