[JIRA] Created: (SSPCPP-501) Make metagen ingest a list of hostnames from a file

Peter Schober (JIRA) noreply at shibboleth.net
Thu Sep 13 17:26:21 EDT 2012


Make metagen ingest a list of hostnames from a file
---------------------------------------------------

                 Key: SSPCPP-501
                 URL: https://issues.shibboleth.net/jira/browse/SSPCPP-501
             Project: Shibboleth SP - C++
          Issue Type: Improvement
          Components: Configuration
            Reporter: Peter Schober
            Assignee: Scott Cantor
            Priority: Trivial
         Attachments: metagen.patch

Inspired by the recent "SP Logout" thread:
http://shibboleth.1660669.n2.nabble.com/SP-Logout-td7581710.html#a7581775

Attached is a patch extending metagen.sh to accept a list (-l) of hostnames from a file (assuming 1 hostname per line). The content of that file is treated as if each hostname had been specified with -h.
(N.B.: Removing the included error checking whether the file $HOSTLIST exists makes this even more flexibel as the list of hosts could then be read from STDIN.)

For deployments with many vhosts this spares the use of writing a wrapper around metagen.sh.

Also -- but not part of the supplied patch; this didn't warrant a seperate issue, IMO -- metagen.sh references /bin/sh but I think will only work with something rather bash-like. At least on Debian or Ubuntu or FreeBSD (none of which are supported platforms) /bin/sh is some form of the Almquist shell and running it there will fail there because of its use of arrays.
So probably the first line should be changed as well, to be on the safe side.
{noformat}
-#!/bin/sh
+#!/usr/bin/env bash
{noformat}
I note that in the Debian package the shebang has already been changed to /bin/bash as well.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the commits mailing list