onos-config 690 Bytes
#!/bin/bash
#-------------------------------------------------------------------------------
# Remotely configures & starts ONOS for the first time.
#-------------------------------------------------------------------------------

[ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1
. $ONOS_ROOT/tools/build/envDefaults

remote=$ONOS_USER@${1:-$OCI}

ssh $remote "
    sudo perl -pi.bak -e \"s/            <interface>.*</            <interface>${ONOS_NIC:-192.168.56.*}</g\" \
        $ONOS_INSTALL_DIR/$KARAF_DIST/etc/hazelcast.xml
    echo \"onos.ip=\$(ifconfig  | grep $ONOS_NIC | cut -d: -f2 | cut -d\\  -f1)\" >> $ONOS_INSTALL_DIR/$KARAF_DIST/etc/system.properties
"