Debian specifics.
authorFrantišek Dvořák <valtri@civ.zcu.cz>
Wed, 11 Apr 2012 14:05:11 +0000 (14:05 +0000)
committerFrantišek Dvořák <valtri@civ.zcu.cz>
Wed, 11 Apr 2012 14:05:11 +0000 (14:05 +0000)
org.glite.testsuites.ctb/gridsite/tests/gridsite-common-testbeds.sh
org.glite.testsuites.ctb/gridsite/tests/gridsite-test-all.sh

index 85e0999..4e4ede7 100755 (executable)
@@ -54,7 +54,18 @@ for dir in /etc/httpd /etc/apache /etc/apache2; do
 done
 HTTPD_CONF=\$HTTPD_CONFDIR/gridsite-webserver.conf
 
-sed -e '1,\$s!/usr/lib/httpd/modules/!modules/!' /usr/share/doc/gridsite-*/httpd-webserver.conf | sed 's!/var/www/html!/var/www/htdocs!' | sed "s/FULL.SERVER.NAME/\$(hostname -f)/" | sed "s/\(GridSiteGSIProxyLimit\)/# \1/"> \$HTTPD_CONF
+# Debian compress everything inside /usr/share/doc
+HTTPD_CONF_SRC=`ls -1 /usr/share/doc/gridsite-*/httpd-webserver.conf* | head -n 1`
+if echo \$HTTPD_CONF_SRC | grep '\.gz$' >/dev/null 2>&1; then
+       gzip -dc < \$HTTPD_CONF_SRC > /tmp/httpd-webserver.conf
+       HTTPD_CONF_SRC=/tmp/httpd-webserver.conf
+fi
+if test [ -z "\$HTTPD_CONF_SRC" ]; then
+       echo "gridsite apache config example not found" >&2
+       exit 2
+fi
+
+sed -e '1,\$s!/usr/lib/httpd/modules/!modules/!' \$HTTPD_CONF_SRC | sed 's!/var/www/html!/var/www/htdocs!' | sed "s/FULL.SERVER.NAME/\$(hostname -f)/" | sed "s/\(GridSiteGSIProxyLimit\)/# \1/"> \$HTTPD_CONF
 echo "AddHandler cgi-script .cgi" >> \$HTTPD_CONF
 echo "ScriptAlias /gridsite-delegation.cgi /usr/sbin/gridsite-delegation.cgi" >> \$HTTPD_CONF
 mkdir -p /var/www/htdocs
index f106c69..0ccf266 100755 (executable)
@@ -528,7 +528,7 @@ EOF
        done
 
        printf "Check interpretable DEFVERSION... "
-       DEFVERSION=`cat /usr/share/doc/gridsite*/VERSION | grep "^DEFVERSION" | head -n 1 | sed 's/DEFVERSION[ \t]*=[ \t]*//'`
+       DEFVERSION=`cat /usr/share/doc/*gridsite*/VERSION | grep "^DEFVERSION" | head -n 1 | sed 's/DEFVERSION[ \t]*=[ \t]*//'`
        printf "Oct %o, Hex %x" $DEFVERSION $DEFVERSION
        if [ $? -eq 0 ]; then
                test_done