Removing more Debian squeeze references. update_for_systemd
authorChris Sharp <csharp@georgialibraries.org>
Mon, 10 Jul 2017 17:31:42 +0000 (13:31 -0400)
committerChris Sharp <csharp@georgialibraries.org>
Mon, 10 Jul 2017 17:31:42 +0000 (13:31 -0400)
templates/setup.sh

index 733d5b6..069436c 100755 (executable)
@@ -81,12 +81,6 @@ tar zxvf tar_file_etc-hosts.tar.gz -C / 2>&1 | tee -a $INSTALL_LOG
 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
-
 
 if cat /etc/hostname | grep "sip\|utility" ### Check if this is a non-brick OpenSRF node.
         then
@@ -106,9 +100,9 @@ fi
 Install_DB_Deps() { ### Install Additional Database dependencies.
 if [ "$OSDISTRO" == "Ubuntu" ]
         then
-       aptitude -y install gcc libxml-libxml-perl libxml-libxslt-perl libjson-xs-perl libmarc-record-perl libmarc-xml-perl libuuid-tiny-perl libbusiness-isbn-perl liblibrary-callnumber-lc-perl
+       $APT_TOOL -y install gcc libxml-libxml-perl libxml-libxslt-perl libjson-xs-perl libmarc-record-perl libmarc-xml-perl libuuid-tiny-perl libbusiness-isbn-perl liblibrary-callnumber-lc-perl
 else
-       aptitude -y install gcc libxml-libxml-perl libxml-libxslt-perl
+       $APT_TOOL -y install gcc libxml-libxml-perl libxml-libxslt-perl
        PERL_MM_USE_DEFAULT=1 cpan Business::ISBN && \
        PERL_MM_USE_DEFAULT=1 cpan JSON::XS && \
         PERL_MM_USE_DEFAULT=1 cpan Library::CallNumber::LC && \
@@ -214,9 +208,7 @@ if [ -e debconf-settings ]
                $APT_TOOL update
                if [ "$PKG_SET" = "0" ]
                        then
-                        aptitude -t squeeze-backports -yq install libpq5 libpq-dev postgresql-client-${PG_VER} || PG_Deps_Warning
-                       elif [ -z "$PKG_SET" ] ; then
-                        aptitude -yq install libpq5 libpq-dev postgresql-client-${PG_VER} || PG_Deps_Warning
+                        $APT_TOOL -yq install libpq5 libpq-dev postgresql-client-${PG_VER} || PG_Deps_Warning
                fi
                InstallDebs
                        else
@@ -333,12 +325,10 @@ then
                echo
                echo "Setting up database server"
                sleep 2
-               if [ "$PKG_SET" = "0" ] #setup backports if debian 6.x
+               if [ "$PKG_SET" = "0" ] 
                then
                        $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 
+                        $APT_TOOL -yq install postgresql-${PG_VER} postgresql-contrib-${PG_VER} postgresql-plperl-${PG_VER} postgresql-server-dev-${PG_VER} || DBInstallErr 
                else
                        echo
                        echo "Failed to set the backports repository for installing Postgresql"