Fix for ONOS_APPS with dot in their name (ONOS-5843).

Change-Id: I6321e9984df2ec2e11aa99edd2756d44c2273c90
diff --git a/tools/package/bin/onos-service b/tools/package/bin/onos-service
index d475968..799bb2f 100755
--- a/tools/package/bin/onos-service
+++ b/tools/package/bin/onos-service
@@ -41,11 +41,13 @@
 # Activate the system required applications (SYS_APPS) as well as any
 # specified applications in the var ONOS_APPS
 for app in ${SYS_APPS//,/ } ${ONOS_APPS//,/ }; do
-  if [[ "$app" =~ \. ]]; then
-    touch ${ONOS_HOME}/apps/$app/active
-  else
-    touch ${ONOS_HOME}/apps/org.onosproject.$app/active
-  fi
+    if  [ -d "${ONOS_HOME}/apps/org.onosproject.$app/" ]; then
+        touch ${ONOS_HOME}/apps/org.onosproject.$app/active
+    elif [ -d "${ONOS_HOME}/apps/$app" ]; then
+        touch ${ONOS_HOME}/apps/$app/active
+    else
+        echo "[WARN] Don't know how to activate $app"
+    fi
 done
 
 exec ${ONOS_HOME}/apache-karaf-$KARAF_VERSION/bin/karaf $KARAF_ARGS
diff --git a/tools/test/bin/onos-config b/tools/test/bin/onos-config
index a38191d..0299d58 100755
--- a/tools/test/bin/onos-config
+++ b/tools/test/bin/onos-config
@@ -14,11 +14,11 @@
 summary:
  Remotely configures and starts ONOS for the first time.
 
- The procedure for configruing a node include determining base features,
+ The procedure for configuring a node includes determining base features,
  applications to load at startup, and clustering and logical network view
  configurations, among others.
 
- If [node] isn't specified, the defualt target becomes \$OCI.
+ If [node] isn't specified, the default target becomes \$OCI.
 
 _EOF_
 }
@@ -51,7 +51,13 @@
 
     # Customize which builtin apps should be ignited
     for app in $(echo $ONOS_APPS | tr ',' ' '); do
-        touch $ONOS_INSTALL_DIR/apps/org.onosproject.\$app/active
+        if  [ -d \"$ONOS_INSTALL_DIR/apps/org.onosproject.\$app/\" ]; then
+            touch $ONOS_INSTALL_DIR/apps/org.onosproject.\$app/active
+        elif [ -d \"$ONOS_INSTALL_DIR/apps/\$app\" ]; then
+            touch $ONOS_INSTALL_DIR/apps/\$app/active
+        else
+            echo \"[WARN] Don\'t know how to activate \$app\"
+        fi
     done
 "