From: Chris Sharp Date: Tue, 27 Jun 2017 19:06:33 +0000 (-0400) Subject: Adding $APT_TOOL wherever possible. Removing more legacy code. X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=be58323a9664bc317a98e69c8389af500b3b524e;p=contrib%2Fpines%2Fgenasys.git Adding $APT_TOOL wherever possible. Removing more legacy code. --- diff --git a/templates/debs/opensrf_2.5.0_amd64.deb b/templates/debs/opensrf_2.5.0_amd64.deb index 35cec3b..38b4b59 100644 Binary files a/templates/debs/opensrf_2.5.0_amd64.deb and b/templates/debs/opensrf_2.5.0_amd64.deb differ diff --git a/templates/setup-drone.sh b/templates/setup-drone.sh index 3daa7a2..d02d8a7 100755 --- a/templates/setup-drone.sh +++ b/templates/setup-drone.sh @@ -117,24 +117,7 @@ if ! grep -q "Evergreen Modifications" /root/.bashrc fi if [ -e drone_file_apt.list ] - then - PG_Deps_Warning () { ### Dependency install error message - echo - echo "*********" - echo "WARNING!! Failed to install: libpq5 libpq-dev postgresql-client-9.1" - 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.1 || PG_Deps_Warning - elif [ -z "$PKG_SET" ] ; then - aptitude -yq install libpq5 libpq-dev postgresql-client-9.1 || PG_Deps_Warning - fi - apt-get update && apt-get -y install $(cat drone_file_apt.list) + $APT_TOOL update && $APT_TOOL -y install $(cat drone_file_apt.list) fi if [ -e debconf-settings ] diff --git a/templates/setup-functions b/templates/setup-functions index ee39713..d8986a4 100644 --- a/templates/setup-functions +++ b/templates/setup-functions @@ -11,7 +11,7 @@ if [ "$OSDISTRO" == "Debian" ] ; then echo "because its broken in cpan." echo sleep 2 - apt-get update && apt-get -y install make libyaz-dev + $APT_TOOL update && $APT_TOOL -y install make libyaz-dev # add new cpan stuff thats not listed as a dependency but it is. PERL_MM_USE_DEFAULT=1 cpan Net::IP PERL_MM_USE_DEFAULT=1 cpan Business::CreditCard::Object @@ -35,7 +35,7 @@ echo installing the debs now... ./debconf-settings && \ rm debconf-settings && \ cd debs && \ -if apt-get update +if $APT_TOOL update then # gdebi --n opensrf*.deb echo diff --git a/templates/setup.sh b/templates/setup.sh index 9b6c3a3..15ef8e1 100755 --- a/templates/setup.sh +++ b/templates/setup.sh @@ -192,8 +192,8 @@ if [ -e tar_file_apt.list ] --shell /bin/bash --group --gecos "PostgreSQL administrator" --uid "$PG_UID" postgres fi fi - apt-get update 2>&1 | tee -a $INSTALL_LOG - apt-get -y install $(cat tar_file_apt.list) 2>&1 | tee -a "$INSTALL_LOG" + $APT_TOOL update 2>&1 | tee -a $INSTALL_LOG + $APT_TOOL -y install $(cat tar_file_apt.list) 2>&1 | tee -a "$INSTALL_LOG" fi PG_Deps_Warning () { ### Dependency install error message @@ -212,7 +212,7 @@ if [ -e debconf-settings ] sleep 2 if ! dpkg -l | grep -q evergreen-ils then - apt-get update + $APT_TOOL update if [ "$PKG_SET" = "0" ] then aptitude -t squeeze-backports -yq install libpq5 libpq-dev postgresql-client-${PG_VER} || PG_Deps_Warning @@ -253,7 +253,7 @@ LDIRECTOR_CUSTOM_DEB="ldirectord-ssl-noverify_3.9.2-5ubuntu4_all.deb" echo "ldirector-ssl-no-verify not found" echo "installing standard ldirector from repos..." read -p "Press [Enter] to continue" CONT - apt-get install ldirectord + $APT_TOOL install ldirectord fi echo "CONFIG_FILE=/etc/ha.d/ldirectord.cf" >> /etc/default/ldirectord @@ -335,7 +335,7 @@ then sleep 2 if [ "$PKG_SET" = "0" ] #setup backports if debian 6.x then - apt-get update + $APT_TOOL update aptitude -t squeeze-backports -yq install postgresql-${PG_VER} postgresql-contrib-${PG_VER} postgresql-plperl-${PG_VER} postgresql-server-dev-${PG_VER} || DBInstallErr elif [ -z "$PKG_SET" ] ; then aptitude -yq install postgresql-${PG_VER} postgresql-contrib-${PG_VER} postgresql-plperl-${PG_VER} postgresql-server-dev-${PG_VER} || DBInstallErr @@ -489,7 +489,7 @@ then then ### Install Icinga echo;echo -e $COL_BR_GREEN "Installing latest Icinga for Monitoring"$COL_RESET;echo - apt-get update && apt-get -y install icinga nagios-nrpe-plugin nagios-nrpe-server + $APT_TOOL update && $APT_TOOL -y install icinga nagios-nrpe-plugin nagios-nrpe-server ### Configure Icinga/Nagios [ -e "/etc/icinga/commands.cfg" ] && mv /etc/icinga/commands.cfg /etc/icinga/commands.cfg-orig [ -e "/etc/icinga/objects/services.cfg" ] && mv /etc/icinga/objects/services.cfg /etc/icinga/objects/services.cfg-orig @@ -658,7 +658,7 @@ then echo;echo "Apache2 not installed yet" echo "installing Apache2..." sleep 1 - apt-get install apache2 openssl + $APT_TOOL install apache2 openssl Config_Apache2_Default_SSL a2ensite default-ssl.conf fi @@ -741,7 +741,7 @@ then useradd -m -u 2000 -s /bin/bash opensrf fi chown -R opensrf:opensrf /storage/reports-output - apt-get install nfs-kernel-server + $APT_TOOL install nfs-kernel-server fi ### make sure the permissions are correct.