From 433e6dd37919b4184522d8d5f1af04e354843b03 Mon Sep 17 00:00:00 2001 From: Chris Sharp Date: Tue, 27 Jun 2017 10:46:46 -0400 Subject: [PATCH] Remove references to Debian squeeze. Make APT tool configurable. --- templates/setup-head.sh | 27 +-------------------------- templates/setup-vars | 8 ++++++++ 2 files changed, 9 insertions(+), 26 deletions(-) diff --git a/templates/setup-head.sh b/templates/setup-head.sh index fe89349..760b5f4 100755 --- a/templates/setup-head.sh +++ b/templates/setup-head.sh @@ -100,35 +100,10 @@ tar zxvf head_file_etc-hosts.tar.gz -C / sed -i 's/^domain.*/domain CLUSTER_DOMAINNAME/g' /etc/resolv.conf sed -i 's/^search.*/search CLUSTER_DOMAINNAME/g' /etc/resolv.conf -### Add backports if debian 6.x -if grep -q 'Debian GNU/Linux 6' /etc/issue - then - echo "deb http://backports.debian.org/debian-backports squeeze-backports main contrib" > /etc/apt/sources.list.d/backports.list;PKG_SET=$? -fi - - ### Install dependencies. if [ -e head_file_apt.list ] then - PG_Deps_Warning () { ### Dependency install error message - echo - echo "*********" - echo "WARNING!! Failed to install: libpq5 libpq-dev postgresql-client-9.3" - echo "*********" - sleep 5 - } - echo "Installing Dependencies" - sleep 2 - apt-get update - if [ "$PKG_SET" = "0" ] - then - aptitude -t squeeze-backports -yq install libpq5 libpq-dev postgresql-client-9.3 || PG_Deps_Warning - elif [ -z "$PKG_SET" ] ; then - aptitude -yq install libpq5 libpq-dev postgresql-client-9.3 || PG_Deps_Warning - fi - - - apt-get update && apt-get -y install $(cat head_file_apt.list) + $APT_TOOL update && $APT_TOOL -y install $(cat head_file_apt.list) fi ### Install Opensrf and Evergreen debs. diff --git a/templates/setup-vars b/templates/setup-vars index 7c9a306..969c3f0 100644 --- a/templates/setup-vars +++ b/templates/setup-vars @@ -34,6 +34,14 @@ INSTALL_LOG="/var/log/genasys_install.log" OSDISTRO=$(lsb_release -i | awk '{ print $1 }') OSRELEASE=$(lsb_release -r | awk '{print $2}') +#Set APT tool +if [ "$OSDISTRO" == "Ubuntu" ] && [ "$OSRELEASE" == "16.04" ] + then + APT_TOOL="apt" +else + APT_TOOL="apt-get" +fi + #Get_OS_Distro if [ "$OSDISTRO" == "Debian" ] then -- 2.11.0