Thomas Vachuska | 82e60a9 | 2015-04-30 01:15:58 -0700 | [diff] [blame^] | 1 | #!/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 | |
| 8 | name=$1 |
| 9 | ipPrefix=$2 |
| 10 | |
| 11 | hzXml=$(dirname $0)/../apache-karaf-*/etc/hazelcast.xml |
| 12 | |
| 13 | perl -pi.bak -e "s/^ <interface>[^<]*/ <interface>$ipPrefix/g" $hzXml |
| 14 | perl -pi -e "s/ <name>[^<]*/ <name>$name/g" $hzXml |