diff options
author | Victor Morales <victor.morales@intel.com> | 2017-08-22 14:39:00 -0500 |
---|---|---|
committer | Victor Morales <victor.morales@intel.com> | 2017-08-22 14:39:00 -0500 |
commit | 7ae05a4cc53bf3298090ade8091485ce2388af1f (patch) | |
tree | 3f7b8e161765cf8d70ebccfc068ecf01f2033a2f /bootstrap/vagrant-onap/lib/commons | |
parent | 9fd0a310dc68031a2feeb397ee7a720a0381fece (diff) |
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 <victor.morales@intel.com>
Issue-Id: INT-18
Diffstat (limited to 'bootstrap/vagrant-onap/lib/commons')
-rwxr-xr-x | bootstrap/vagrant-onap/lib/commons | 21 |
1 files changed, 21 insertions, 0 deletions
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 +} |