Skip to content

Commit

Permalink
- Fixed bug that caused the script to stop when running for the first…
Browse files Browse the repository at this point in the history
… time.
  • Loading branch information
alnvdl committed Jun 4, 2012
1 parent 215a0bc commit aa23384
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 29 deletions.
2 changes: 1 addition & 1 deletion README
Expand Up @@ -338,7 +338,7 @@ https://groups.google.com/group/routeflow-discuss/topics

- Wireshark dissector plugin for the RouteFlow protocol

- Experiment with NEC Trema controller: Port routeflowc to Trema
- Experiment with NEC Trema controller: Port rfproxy to Trema

- Add TTL-decrement action (if supported by the datapath devices)

Expand Down
28 changes: 14 additions & 14 deletions rftest/rftest1
Expand Up @@ -53,8 +53,18 @@ kill_process_tree() {
}

reset() {
killtree=$1;
if [ $killtree -eq 1 ]; then
init=$1;
if [ $init -eq 1 ]; then
echo_bold "-> Starting OVS daemons...";
# Always try to start OVS
ovsdb-server --remote=punix:/usr/local/var/run/openvswitch/db.sock \
--remote=db:Open_vSwitch,manager_options \
--private-key=db:SSL,private_key \
--certificate=db:SSL,certificate \
--bootstrap-ca-cert=db:SSL,ca_cert \
--pidfile --detach
ovs-vswitchd --pidfile --detach
else
echo_bold "-> Stopping child processes...";
kill_process_tree 1 $$
fi
Expand All @@ -78,18 +88,8 @@ reset() {
rm -rf $HOME/db;
rm -rf /var/lib/lxc/rfvm1/rootfs/opt/rfclient;
}
reset 0
trap "reset 1; exit 0" INT

echo_bold "-> Starting OVS daemons...";
# Always try to start OVS
ovsdb-server --remote=punix:/usr/local/var/run/openvswitch/db.sock \
--remote=db:Open_vSwitch,manager_options \
--private-key=db:SSL,private_key \
--certificate=db:SSL,certificate \
--bootstrap-ca-cert=db:SSL,ca_cert \
--pidfile --detach
ovs-vswitchd --pidfile --detach
reset 1
trap "reset 0; exit 0" INT

if [ "$ACTION" != "RESET" ]; then
echo_bold "-> Starting MongoDB..."
Expand Down
28 changes: 14 additions & 14 deletions rftest/rftest2
Expand Up @@ -53,8 +53,18 @@ kill_process_tree() {
}

reset() {
killtree=$1;
if [ $killtree -eq 1 ]; then
init=$1;
if [ $init -eq 1 ]; then
echo_bold "-> Starting OVS daemons...";
# Always try to start OVS
ovsdb-server --remote=punix:/usr/local/var/run/openvswitch/db.sock \
--remote=db:Open_vSwitch,manager_options \
--private-key=db:SSL,private_key \
--certificate=db:SSL,certificate \
--bootstrap-ca-cert=db:SSL,ca_cert \
--pidfile --detach
ovs-vswitchd --pidfile --detach
else
echo_bold "-> Stopping child processes...";
kill_process_tree 1 $$
fi
Expand Down Expand Up @@ -83,18 +93,8 @@ reset() {
rm -rf /var/lib/lxc/rfvmC/rootfs/opt/rfclient;
rm -rf /var/lib/lxc/rfvmD/rootfs/opt/rfclient;
}
reset 0
trap "reset 1; exit 0" INT

echo_bold "-> Starting OVS daemons...";
# Always try to start OVS
ovsdb-server --remote=punix:/usr/local/var/run/openvswitch/db.sock \
--remote=db:Open_vSwitch,manager_options \
--private-key=db:SSL,private_key \
--certificate=db:SSL,certificate \
--bootstrap-ca-cert=db:SSL,ca_cert \
--pidfile --detach
ovs-vswitchd --pidfile --detach
reset 1
trap "reset 0; exit 0" INT

if [ "$ACTION" != "RESET" ]; then
echo_bold "-> Starting MongoDB..."
Expand Down

0 comments on commit aa23384

Please sign in to comment.