Cherry-pick from https://gerrit.onos.onlab.us/#/c/68/
Revise onos.py for ramcloud branch
issue: ONOS-959
Conflicts:
start-rest.sh
NOTE: The above conflict has been resolved by hand.
In the process, minor refactoring/editing was done
for consistency with the rest of the scripts:
ONOSDIR -> ONOS_HOME
NOTE2: Fixed few issues in file vm-utils/onos.py that are related
to RAMCloud:
- Fixed the path to the RAMCloud ramcloud.conf configuration file
- Fixed the path to the RAMCloud daemon.
NOTE3: Fixed the modules list as set in baseModule in file vm-utils/onos.py
to reflect the dev/ramcloud-new-datamodel list.
NOTE4: Changed the file permission of vm-utils/onos.py so it is executable.
Change-Id: I4e245f694f9ed4182b49410707d214a2d6a056de
diff --git a/start-onos.sh b/start-onos.sh
index 5e8af65..248954d 100755
--- a/start-onos.sh
+++ b/start-onos.sh
@@ -12,9 +12,9 @@
## Because the script change dir to $ONOS_HOME, we can set ONOS_LOGBACK and LOGDIR relative to $ONOS_HOME
ONOS_LOGBACK=${ONOS_LOGBACK:-${ONOS_HOME}/logback.`hostname`.xml}
LOGDIR=${ONOS_LOGDIR:-${ONOS_HOME}/onos-logs}
-
-ONOS_LOG="${LOGDIR}/onos.`hostname`.log"
-PCAP_LOG="${LOGDIR}/onos.`hostname`.pcap"
+LOGBASE=${ONOS_LOGBASE:-onos.`hostname`}
+ONOS_LOG="${LOGDIR}/${LOGBASE}.log"
+PCAP_LOG="${LOGDIR}/${LOGBASE}.pcap"
LOGS="$ONOS_LOG $PCAP_LOG"
ONOS_PROPS=${ONOS_PROPS:-${ONOS_HOME}/conf/onos.properties}
@@ -124,7 +124,7 @@
echo $ONOS_HOME
cd ${ONOS_HOME}
pwd
- java ${JVM_OPTS} -Dlogback.configurationFile=${ONOS_LOGBACK} -cp ${JAVA_CP} ${MAIN_CLASS} -cf ${ONOS_PROPS} > ${LOGDIR}/onos.`hostname`.stdout 2>${LOGDIR}/onos.`hostname`.stderr &
+ java ${JVM_OPTS} -Dlogback.configurationFile=${ONOS_LOGBACK} -cp ${JAVA_CP} ${MAIN_CLASS} -cf ${ONOS_PROPS} > ${LOGDIR}/${LOGBASE}.stdout 2>${LOGDIR}/${LOGBASE}.stderr &
echo "Waiting for ONOS to start..."
COUNT=0
@@ -179,7 +179,7 @@
start
;;
startnokill)
- check_db
+# check_db
start
;;
startifdown)