blob: 307a628b0543375db4ffa8bdfe82dc01295b84bc [file] [log] [blame]
Thomas Vachuska82e60a92015-04-30 01:15:58 -07001#!/bin/bash
2# -----------------------------------------------------------------------------
3# Configures ONOS to multicast on the specified IP prefix/subnet.
4# -----------------------------------------------------------------------------
5
6[ $# -lt 2 ] && echo "usage: $(basename $0) name ipPrefix" && exit 1
7
8name=$1
9ipPrefix=$2
10
11hzXml=$(dirname $0)/../apache-karaf-*/etc/hazelcast.xml
12
13perl -pi.bak -e "s/^ <interface>[^<]*/ <interface>$ipPrefix/g" $hzXml
14perl -pi -e "s/ <name>[^<]*/ <name>$name/g" $hzXml