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.
I note that in the Debian package the shebang has already been changed to /bin/bash as well.
Patch from Peter to fix bug in initial implementation.
peter January 9, 2013 at 5:53 PM
Edited
Sorry, my "host list" implementation was incomplete (as `test -s $FOO` returns true if $FOO is unset). As such any use of metagen.sh without the -l option now produces warnings.
Please wrap that whole section from line 77 to 85 in a if [ ! -z $HOSTLIST ] conditional. I can't attach the patch to a closed issue, it seems.
Scott Cantor December 10, 2012 at 7:13 PM
Closing with release.
Fixed
Pinned fields
Click on the next to a field label to start pinning.
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.
I note that in the Debian package the shebang has already been changed to /bin/bash as well.