Adding install/uninstall scripts and stuff like that.
diff --git a/tools/package/wrapper/lib/karaf-wrapper.jar b/tools/package/wrapper/lib/karaf-wrapper.jar
new file mode 100644
index 0000000..4db355b
--- /dev/null
+++ b/tools/package/wrapper/lib/karaf-wrapper.jar
Binary files differ
diff --git a/tools/package/wrapper/lib/libwrapper.so b/tools/package/wrapper/lib/libwrapper.so
new file mode 100644
index 0000000..24197bf
--- /dev/null
+++ b/tools/package/wrapper/lib/libwrapper.so
Binary files differ
diff --git a/tools/test/bin/onos-install b/tools/test/bin/onos-install
index 2a54757..babfdef 100755
--- a/tools/test/bin/onos-install
+++ b/tools/test/bin/onos-install
@@ -1,17 +1,24 @@
#!/bin/bash
#-------------------------------------------------------------------------------
-# Remotely install & starts ONOS.
+# Remotely pushes bits to a remote machine and install & starts ONOS.
#-------------------------------------------------------------------------------
[ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1
. $ONOS_ROOT/tools/build/envDefaults
+# If the first option is -f attempt uninstall first.
+[ "$1" = "-f" ] && shift && onos-uninstall ${1:-$OCI}
+
remote=$ONOS_USER@${1:-$OCI}
-ssh $remote "
- [ -d $ONOS_INSTALL_DIR ] && echo \"ONOS is already installed\" && exit 1
+scp -q $ONOS_TAR $remote:/tmp
- sudo mkdir $ONOS_INSTALL_DIR && sudo chown sdn:sdn $ONOS_INSTALL_DIR
+ssh $remote "
+ [ -d $ONOS_INSTALL_DIR/bin ] && echo \"ONOS is already installed\" && exit 1
+
+ sudo mkdir -p $ONOS_INSTALL_DIR && sudo chown sdn:sdn $ONOS_INSTALL_DIR
tar zxmf /tmp/$ONOS_BITS.tar.gz -C $ONOS_INSTALL_DIR --strip-components=1
+ ln -s /opt/onos/$KARAF_DIST/data/log /opt/onos/log
+
"
diff --git a/tools/test/bin/onos-uninstall b/tools/test/bin/onos-uninstall
index 6028b20..a535c0a 100755
--- a/tools/test/bin/onos-uninstall
+++ b/tools/test/bin/onos-uninstall
@@ -9,6 +9,7 @@
remote=$ONOS_USER@${1:-$OCI}
ssh $remote "
- [ -f $ONOS_INSTALL_DIR/bin/onos ] && $ONOS_INSTALL_DIR/bin/onos halt
+ [ -f $ONOS_INSTALL_DIR/bin/onos ] && \
+ $ONOS_INSTALL_DIR/bin/onos halt 2>/dev/null
sudo rm -fr $ONOS_INSTALL_DIR
"
diff --git a/tools/test/bin/push-bits b/tools/test/bin/push-bits
deleted file mode 100755
index f090da6..0000000
--- a/tools/test/bin/push-bits
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/bash
-#-------------------------------------------------------------------------------
-# Pushes ONOS distributable bits in onos.tar.gz to a remote machine.
-#-------------------------------------------------------------------------------
-
-[ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1
-. $ONOS_ROOT/tools/build/envDefaults
-
-remote=$ONOS_USER@${1:-$OCI}
-
-scp $ONOS_TAR $remote:/tmp