Adding ability to run ONOS locally via 'buck run onos'

Runs ONOS as a server and requires client connections with ONOS_USE_SSH unset.

Change-Id: Id0aedccbfddfb8f3f17b2ef7f73e805066976315
diff --git a/tools/package/BUCK b/tools/package/BUCK
index a3f132f..31896f3 100644
--- a/tools/package/BUCK
+++ b/tools/package/BUCK
@@ -106,3 +106,12 @@
   bash = '$(exe //buck-tools:onos-stage) $OUT $(location :onos-karaf) ' + ' '.join(sources),
   visibility = [ 'PUBLIC' ],
 )
+
+genrule(
+  name = 'onos-run',
+  out = 'onos-run',
+  srcs = [ 'onos-run-karaf' ],
+  bash = 'sed "s#ONOS_TAR=#ONOS_TAR=$(location :onos-package)#" $SRCS > $OUT; chmod +x $OUT',
+  executable = True,
+  visibility = [ 'PUBLIC' ],
+)
\ No newline at end of file