Eliminating use of Apache Karaf CLI client and of ONOS_USE_SSH env. variable.
All CLI access is now through the raw SSH client.
To enable passwordless access, the 'onos-user-key' tool should be used to add user keys.
Added 'onos-user-password' tool in the similar vein and usage as the 'onos-user-key' tool.
Change-Id: Ic5482fc8012369edc818691402ba45d13f130452
diff --git a/tools/package/onos-run-karaf b/tools/package/onos-run-karaf
index f27428e..3f369a3 100755
--- a/tools/package/onos-run-karaf
+++ b/tools/package/onos-run-karaf
@@ -48,10 +48,9 @@
export ONOS_HOME=$PWD
# Run using the secure SSH client
- export ONOS_USE_SSH=true
[ ! -f ~/.ssh/id_rsa.pub ] && ssh-keygen -t rsa -f ~/.ssh/id_rsa -P '' -q
$ONOS_HOME/bin/onos-user-key $(id -un) "$(cut -d\ -f2 ~/.ssh/id_rsa.pub)"
- $ONOS_HOME/bin/onos-secure-ssh -u onos -p rocks
+ $ONOS_HOME/bin/onos-user-password onos rocks
# Create config/cluster.json (cluster metadata)
IP=${ONOS_IP:-127.0.0.1}
@@ -80,7 +79,7 @@
function killServer() {
echo "Killing ONOS server..."
- kill -9 $(cat /tmp/onos.pid) 2>/dev/null
+ cat /tmp/onos.pid | xargs kill -9
}
# Hang-on a bit and then start tailing the ONOS log output