From: Zdeněk Šustr Date: Mon, 6 Feb 2012 15:44:45 +0000 (+0000) Subject: Hopefully improve portability X-Git-Tag: gridsite-core_R_1_7_17~127 X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=0c0709fa82049d9f8b8e18f551db599ab2a03444;p=jra1mw.git Hopefully improve portability --- diff --git a/org.glite.testsuites.ctb/LB/tests/lb-common-testbeds.sh b/org.glite.testsuites.ctb/LB/tests/lb-common-testbeds.sh index eef2c81..293236f 100755 --- a/org.glite.testsuites.ctb/LB/tests/lb-common-testbeds.sh +++ b/org.glite.testsuites.ctb/LB/tests/lb-common-testbeds.sh @@ -16,11 +16,19 @@ # limitations under the License. # + function gen_arrange_script() { remotehost=$1 COPYPROXY=$2 +egrep -i "Debian|Ubuntu" /etc/issue +if [ \$? = 0 ]; then + INSTALLCMD="apt-get install -q --yes" +else + INSTALLCMD="yum install -q -y" +fi + cat << EndArrangeScript > arrange_lb_test_root.sh CERTFILE=\$1 GLITE_USER=\$2 @@ -34,16 +42,7 @@ echo "Output format: \$OUTPUT_OPT " export LBTSTCOLS -yum install -q -y globus-proxy-utils -yum install -q -y postgresql postgresql-server -#Standard setup now uses production brokers. No need to install our own. -#yum install -q -y activemq java-1.6.0-openjdk -yum install -q -y emi-lb-nagios-plugins -yum install -q -y voms-clients -yum install -q -y curl -yum install -q -y wget -yum install -q -y sudo -yum install -q -y bc +${INSTALLCMD} globus-proxy-utils postgresql postgresql-server emi-lb-nagios-plugins voms-clients curl wget sudo bc /etc/init.d/postgresql initdb >/dev/null 2>&1 /etc/init.d/postgresql start @@ -69,14 +68,7 @@ CVSPATH=\`which cvs\` if [ "\$CVSPATH" = "" ]; then printf "CVS binary not present" - egrep -i "Debian|Ubuntu" /etc/issue - - if [ \$? = 0 ]; then - apt-get install --yes cvs - else - yum install -y cvs - fi - + ${INSTALLCMD} cvs fi glite_id=\`id -u \$GLITE_USER\` diff --git a/org.glite.testsuites.ctb/gridsite/tests/gridsite-common-testbeds.sh b/org.glite.testsuites.ctb/gridsite/tests/gridsite-common-testbeds.sh index 4ad576e..162405b 100755 --- a/org.glite.testsuites.ctb/gridsite/tests/gridsite-common-testbeds.sh +++ b/org.glite.testsuites.ctb/gridsite/tests/gridsite-common-testbeds.sh @@ -30,6 +30,13 @@ for dir in /etc/httpd /etc/apache /etc/apache2; do done HTTPD_CONF=$HTTPD_CONFDIR/gridsite-webserver.conf +egrep -i "Debian|Ubuntu" /etc/issue +if [ \$? = 0 ]; then + INSTALLCMD="apt-get install -q --yes" +else + INSTALLCMD="yum install -q -y" +fi + cat << EndArrangeScript > arrange_gridsite_test_root.sh CERTFILE=\$1 GLITE_USER=\$2 @@ -43,9 +50,7 @@ echo "Output format: \$OUTPUT_OPT " export GSTSTCOLS -yum install -q -y voms-clients -yum install -q -y httpd mod_ssl -yum install -q -y curl wget nc lsof +${INSTALLCMD} voms-clients httpd mod_ssl curl wget nc lsof 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 @@ -63,14 +68,7 @@ CVSPATH=\`which cvs\` if [ "\$CVSPATH" = "" ]; then printf "CVS binary not present" - egrep -i "Debian|Ubuntu" /etc/issue - - if [ \$? = 0 ]; then - apt-get install --yes cvs - else - yum install -y cvs - fi - + ${INSTALLCMD} cvs fi if [ $COPYPROXY -eq 1 ]; then