Tuning for Debian.
authorFrantišek Dvořák <valtri@civ.zcu.cz>
Mon, 27 Feb 2012 23:53:00 +0000 (23:53 +0000)
committerFrantišek Dvořák <valtri@civ.zcu.cz>
Mon, 27 Feb 2012 23:53:00 +0000 (23:53 +0000)
org.glite.testsuites.ctb/LB/tests/lb-common-testbeds.sh
org.glite.testsuites.ctb/LB/tests/lb-common.sh

index dacb464..349868c 100755 (executable)
@@ -23,7 +23,7 @@ remotehost=$1
 COPYPROXY=$2
 
 egrep -i "Debian|Ubuntu" /etc/issue
-if [ \$? = 0 ]; then
+if [ $? = 0 ]; then
        INSTALLCMD="apt-get install -q --yes"
        INSTALLPKGS="lintian"
 else
@@ -48,8 +48,13 @@ ${INSTALLCMD} globus-proxy-utils postgresql postgresql-server emi-lb-nagios-plug
 
 /etc/init.d/postgresql initdb >/dev/null 2>&1
 /etc/init.d/postgresql start
-mv /var/lib/pgsql/data/pg_hba.conf /var/lib/pgsql/data/pg_hba.conf.orig
-cat >/var/lib/pgsql/data/pg_hba.conf <<EOF
+for conf in /etc/postgresql/8.4/main/pg_hba.conf /var/lib/pgsql/data/pg_hba.conf; do
+       if [ -f \$conf ]; then
+               break;
+       fi
+done
+mv \$conf \$conf.orig
+cat >\$conf <<EOF
 local all all trust
 host all all 127.0.0.1/32 ident
 host all all ::1/128 ident
index f4fc255..ba17b72 100755 (executable)
@@ -384,17 +384,25 @@ function check_lintian() {
        local dir=/tmp/lintian-check.$$
        local pkgs=''
        local pkg=''
+       local src=''
        local out=''
        local ret=0
 
+       rm -rf $dir
+       mkdir $dir
        while test -n "$1"; do
-               pkgs="$pkgs `dpkg-query -W -f '${Source}\n' $1 2>$dir/query.log`"
+               pkgs="$pkgs `dpkg-query -W $1 2>>$dir/query.log | cut -f1`
+"
                shift
        done
+       for pkg in $pkgs; do
+               src=`dpkg-query -W -f '${Source}' $pkg 2>>$dir/query.log`
+               if [ -z "$src" ]; then src="$pkg"; fi
+               pkgs="$pkgs
+$src"
+       done
        pkgs=`echo "$pkgs" | sort | uniq`
 
-       rm -f $dir
-       mkdir $dir
        printf "Downloading packages..."
        (cd $dir; apt-get -d source $pkgs >$dir/download.log)
        if test $? -eq 0; then
@@ -408,7 +416,6 @@ function check_lintian() {
                echo $pkg:
                out="`lintian $dir/${pkg}_*.dsc`"
                echo "$out"
-               echo
                if echo $out | grep -i '^E:' >/dev/null; then
                        ret=1
                fi