update some demo-related scripts and config files
diff --git a/scripts/demo-reset-sw.sh b/scripts/demo-reset-sw.sh
index e6cabae..34950c5 100755
--- a/scripts/demo-reset-sw.sh
+++ b/scripts/demo-reset-sw.sh
@@ -1,17 +1,21 @@
 #! /bin/bash
+source ~/env_cluster
 basename=$ONOS_CLUSTER_BASENAME
 DIR=${HOME}/ONOS
 tstart=`date +"%s"`
 echo "All Link Up"
 $DIR/scripts/all-linkup.sh
 echo "Delete Flows"
-$DIR/web/delete_flow.py 201 300
+$DIR/web/delete_flow.py 1 300
+$DIR/web/clear_flow.py 1 300
 echo "Adding Flows"
 $DIR/web/add_flow.py -m onos -f $DIR/web/flowdef_demo_start.txt
-ssh -i ~/.ssh/onlabkey.pem  ${basename}5 'ONOS/start-onos.sh stop'
-ssh -i ~/.ssh/onlabkey.pem  ${basename}7 'ONOS/start-onos.sh stop'
-for i in 1 2 3 4 6 8; do
-    ssh -i ~/.ssh/onlabkey.pem  ${basename}$i 'ONOS/start-onos.sh startifdown'
+ssh -i ~/.ssh/onlabkey.pem  ${basename}5 'cd ONOS;./start-onos.sh stop'
+ssh -i ~/.ssh/onlabkey.pem  ${basename}6 'cd ONOS;./start-onos.sh stop'
+ssh -i ~/.ssh/onlabkey.pem  ${basename}7 'cd ONOS;./start-onos.sh stop'
+ssh -i ~/.ssh/onlabkey.pem  ${basename}8 'cd ONOS;./start-onos.sh stop'
+for i in 1 2 3 4 ; do
+    ssh -i ~/.ssh/onlabkey.pem  ${basename}$i 'cd ONOS;./start-onos.sh startifdown'
 done
 sleep 2
 for i in 1 2 3 4 5 6 7 8; do
diff --git a/scripts/demo-scale-out-sw.sh b/scripts/demo-scale-out-sw.sh
index 887a025..9e988bf 100755
--- a/scripts/demo-scale-out-sw.sh
+++ b/scripts/demo-scale-out-sw.sh
@@ -1,14 +1,31 @@
 #! /bin/bash
+source ~/env_cluster
 basename=$ONOS_CLUSTER_BASENAME
 DIR=${HOME}/ONOS
+
+function scale_onos(){
+  for i in 5 6 7 8 ; do
+    ssh -i ~/.ssh/onlabkey.pem  ${basename}${i} 'cd ONOS;./start-onos.sh start' &
+  done
+
+  while [ 1 ]; do
+    up=`for i in 5 6 7 8 ; do
+      ssh -i ~/.ssh/onlabkey.pem  ${basename}${i} 'cd ONOS;./start-onos.sh status' &
+    done | grep "instance" | awk '{s+=$1}END{print s}'`
+
+    if [ x$up == 4 ]; then
+      break;
+    fi 
+    sleep 1
+  done
+}
+
 start=`date +"%s"`
-echo "bring up two nodes"
-ssh -i ~/.ssh/onlabkey.pem  ${basename}5 'ONOS/start-onos.sh start'
-ssh -i ~/.ssh/onlabkey.pem  ${basename}7 'ONOS/start-onos.sh start'
+echo "bring up four nodes"
+scale_onos
 sleep 2
 echo "Adding more flows"
 $DIR/web/add_flow.py -m onos -f $DIR/web/flowdef_demo_add.txt
 endt=`date +"%s"`
 (( delta = endt -start ))
 echo "Scale Up Done: took $delta sec"
-