md5 sum command on linux is different than on Mac OS

Change-Id: I64414c0b8dd217d2566b2623e1de31a26cb6d032
diff --git a/tools/package/onos-run-karaf b/tools/package/onos-run-karaf
index f6daac1..3406b55 100755
--- a/tools/package/onos-run-karaf
+++ b/tools/package/onos-run-karaf
@@ -14,8 +14,14 @@
 ONOS_MD5=$ONOS_DIR/CHECKSUM
 
 # Extract MD5 of the ONOS tar file and of the previous installation, if one exists
+md5cmd=''
+case "$OSTYPE" in
+  darwin*)  md5cmd='md5' ;;
+  *)        md5cmd='md5sum' ;;
+esac
+
 oldMD5=$(cat $ONOS_MD5 2>/dev/null)
-newMD5=$(md5 -q $ONOS_TAR)
+newMD5=$(${md5cmd} -q $ONOS_TAR)
 
 # Search for the "clean" argument anywhere on the command-line
 echo "$@" | egrep -q "\bclean\b" && clean=true || unset clean