# * Excluded nodes: unless specified via comma-separated list of IP offsets,
# nodes are excluded via their node types
# * Number of public addresses per interface is either specified or $NUMNODES.
-make_public_addresses () {
+make_public_addresses_old () {
local firstip="${1:-$(($FIRSTIP + $PUBLIC_IP_OFFSET))}"
local excluded_nodes="$2"
local num_addrs="${3:-${NUMNODES}}"
hack_all_nodes_with make_public_addresses_for_node
}
+make_public_addresses() {
+ local firstip="${1:-$[${FIRSTIP} + ${PUBLIC_IP_OFFSET}]}"
+ local num_addrs="${2:-${NUMNODES}}"
+
+ if [ $[ $firstip + $num_addrs - 1 ] -gt 254 ]; then
+ die "make_public_addresses: last octet > 254 - change PUBLIC_IP_OFFSET"
+ fi
+
+ local e
+ for e in $IPNET0 $IPNET1 $IPNET2 ; do
+ echo -ne "${IPBASE}.${e}.${firstip},${num_addrs},eth${e} "
+ done
+ echo
+}
+
######################################################################
post_config_hooks=
"<n>" "offset from FIRSTIP of public IP addresses"
defconf PUBLIC_ADDRESSES "|make_public_addresses" \
- "<cmd>" "template for public address entries in conf.base-SoFS"
+ "<cmd>" "template for public address entry in gpfs-nas.conf"
# a caching web proxy that can get to the install server from the
# nodes. If you don't have one on the local network then look in