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
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 && \
$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
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"