From bd925e48367913a8c4a3f8e9c155e33c2ae78ba9 Mon Sep 17 00:00:00 2001 From: garciadeblas Date: Thu, 14 Jun 2018 14:32:12 +0200 Subject: [PATCH] installers: missing deb packages for Ubuntu Server ISO Change-Id: Id2287931b58e11293705bf05c9eb99fcb63efbd0 Signed-off-by: garciadeblas --- installers/full_install_osm.sh | 2 +- installers/install_osm.sh | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/installers/full_install_osm.sh b/installers/full_install_osm.sh index 3515797f..2774e0df 100755 --- a/installers/full_install_osm.sh +++ b/installers/full_install_osm.sh @@ -910,7 +910,7 @@ function install_lightweight() { # if no host is passed in, we need to install lxd/juju, unless explicilty asked not to if [ -z "$OSMLCM_VCA_HOST" ] && [ -z "$INSTALL_NOLXD" ]; then - need_packages_lw="lxd" + need_packages_lw="lxd snapd" 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." \ diff --git a/installers/install_osm.sh b/installers/install_osm.sh index d415b43d..2ab11d6d 100755 --- a/installers/install_osm.sh +++ b/installers/install_osm.sh @@ -8,6 +8,18 @@ add_repo() { grep "${REPO_CHECK/\[arch=amd64\]/\\[arch=amd64\\]}" /etc/apt/sources.list > /dev/null 2>&1 if [ $? -ne 0 ] then + need_packages_lw="software-properties-common apt-transport-https" + 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 -q update \ + || ! echo "failed to run apt-get update" + || exit 1 + dpkg -l $need_packages_lw &>/dev/null \ + || ! echo -e "Installing $need_packages_lw requires root privileges." \ + || sudo apt-get install -y $need_packages_lw \ + || ! echo "failed to install $need_packages_lw" + || exit 1 wget -qO - $REPOSITORY_BASE/$RELEASE/OSM%20ETSI%20Release%20Key.gpg | sudo apt-key add - sudo DEBIAN_FRONTEND=noninteractive add-apt-repository -y "$1" && sudo DEBIAN_FRONTEND=noninteractive apt-get update return 0 -- 2.25.1