From 7ae05a4cc53bf3298090ade8091485ce2388af1f Mon Sep 17 00:00:00 2001 From: Victor Morales Date: Tue, 22 Aug 2017 14:39:00 -0500 Subject: Fixed Setup Titan AAI process The way to configure properties files was wrong causing problems during the DB creation. This change files that function as well as others related with that function. Change-Id: I5cc637e170b64e15fff5de4cb04bdcbd2506ea87 Signed-off-by: Victor Morales Issue-Id: INT-18 --- bootstrap/vagrant-onap/lib/commons | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'bootstrap/vagrant-onap/lib/commons') diff --git a/bootstrap/vagrant-onap/lib/commons b/bootstrap/vagrant-onap/lib/commons index 019eeb5c2..26e2cc26a 100755 --- a/bootstrap/vagrant-onap/lib/commons +++ b/bootstrap/vagrant-onap/lib/commons @@ -31,6 +31,13 @@ function is_package_installed { dpkg -s "$@" > /dev/null 2> /dev/null } +# install_packages() - Install a list of packages +function install_packages { + local package=$@ + update_repos + apt-get install -y -qq $package +} + # install_package() - Install specific package if doesn't exist function install_package { local package=$1 @@ -39,3 +46,17 @@ function install_package { apt-get install -y -qq $package fi } + +# uninstall_packages() - Uninstall a list of packages +function uninstall_packages { + local packages=$@ + apt-get purge -y -qq $packages +} + +# uninstall_package() - Uninstall specific package if exists +function uninstall_package { + local package=$1 + if is_package_installed $package; then + apt-get purge -y -qq $package + fi +} -- cgit 1.2.3-korg