Run ifconfig as sudo for OSes that require it
Change-Id: I4fbfa5ba90cde1c6d8a608f1883ae3183abf4c6b
diff --git a/tools/test/bin/onos-config b/tools/test/bin/onos-config
index 178bd23..0921c13 100755
--- a/tools/test/bin/onos-config
+++ b/tools/test/bin/onos-config
@@ -31,7 +31,7 @@
sudo perl -pi -e \"s/ <name>onos</ <name>${ONOS_CELL:-onos}</g\" \
$ONOS_INSTALL_DIR/$KARAF_DIST/etc/hazelcast.xml
- echo \"onos.ip = \$(ifconfig | grep $ONOS_NIC | cut -d: -f2 | cut -d\\ -f1)\" \
+ echo \"onos.ip = \$(sudo ifconfig | grep $ONOS_NIC | cut -d: -f2 | cut -d\\ -f1)\" \
>> $ONOS_INSTALL_DIR/$KARAF_DIST/etc/system.properties
# Drop copycat related log level for the console