From: garciadeblas Date: Thu, 3 May 2018 09:49:00 +0000 (+0200) Subject: install_osm.sh: ligtweight install includes lxd with apt-get X-Git-Tag: v3.1.0~4 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F54%2F6054%2F1;p=osm%2Fdevops.git install_osm.sh: ligtweight install includes lxd with apt-get Change-Id: I293325cd4735f2c359e27db5238da3aae55a08d9 Signed-off-by: garciadeblas --- diff --git a/installers/install_osm.sh b/installers/install_osm.sh index 15037c78..9ba080ab 100755 --- a/installers/install_osm.sh +++ b/installers/install_osm.sh @@ -589,6 +589,16 @@ function install_lightweight() { DEFAULT_IF=`route -n |awk '$1~/^0.0.0.0/ {print $8}'` DEFAULT_IP=`ip -o -4 a |grep ${DEFAULT_IF}|awk '{split($4,a,"/"); print a[1]}'` DEFAULT_MTU=$(ip addr show ${DEFAULT_IF} | perl -ne 'if (/mtu\s(\d+)/) {print $1;}') + need_packages_lw="lxd" + echo -e "Checking required packages: $need_packages_lw" + dpkg -l $need_packages_lw &>/dev/null \ + || ! echo -e "One or several required packages are not installed. Updating apt cache requires root privileges." \ + || sudo apt-get update \ + || FATAL "failed to run apt-get update" + dpkg -l $need_packages_lw &>/dev/null \ + || ! echo -e "Installing $need_packages_lw requires root privileges." \ + || sudo apt-get install -y $need_packages_lw \ + || FATAL "failed to install $need_packages_lw" install_juju install_docker_ce #install_docker_compose