[cpp-sp COMMIT] /branches/REL_2/configs/metagen.sh

noreply at shibboleth.net noreply at shibboleth.net
Wed Nov 28 22:37:51 EST 2012


Author: scantor
Date: Wed Nov 28 22:37:51 2012
New Revision: 3824

URL: http://svn.shibboleth.net/view/cpp-sp?rev=3824&view=rev
Log:
https://issues.shibboleth.net/jira/browse/SSPCPP-501

Modified:
    branches/REL_2/configs/metagen.sh

Modified: branches/REL_2/configs/metagen.sh
URL: http://svn.shibboleth.net/view/cpp-sp/branches/REL_2/configs/metagen.sh?rev=3824&r1=3823&r2=3824&view=diff
==============================================================================
--- branches/REL_2/configs/metagen.sh (original)
+++ branches/REL_2/configs/metagen.sh Wed Nov 28 22:37:51 2012
@@ -1,4 +1,4 @@
-#! /bin/sh
+#!/usr/bin/env bash
 
 DECLS=1
 
@@ -23,13 +23,14 @@
 SAML1POST="urn:oasis:names:tc:SAML:1.0:profiles:browser-post"
 SAML1ART="urn:oasis:names:tc:SAML:1.0:profiles:artifact-01"
 
-while getopts a:c:e:f:h:n:o:s:t:u:12ADLNO c
+while getopts a:c:e:f:h:l:n:o:s:t:u:12ADLNO c
      do
          case $c in
            c)   CERTS[${#CERTS[*]}]=$OPTARG;;
            e)   ENTITYID=$OPTARG;;
            f)   FORMATS[${#FORMATS[*]}]=$OPTARG;;
            h)   HOSTS[${#HOSTS[*]}]=$OPTARG;;
+           l)   HOSTLIST=$OPTARG;;
            n)   NAKEDHOSTS[${#NAKEDHOSTS[*]}]=$OPTARG;;
            o)   ORGNAME=$OPTARG;;
            a)   ADMIN[${#ADMIN[*]}]=$OPTARG;;
@@ -73,6 +74,16 @@
     fi
 fi
 
+if [ -s $HOSTLIST ] ; then
+    while read h
+    do
+        HOSTS[${#HOSTS[@]}]=$h
+    done <$HOSTLIST
+else
+    echo File with list of hostnames $l does not exist! 
+    exit 2
+fi
+
 # Establish protocols and bindings.
 
 if [ $SAML1 -eq 0 -a $SAML2 -eq 0 ] ; then



More information about the commits mailing list