Pavlin Radoslavov

Minor cleanup in some of the shell scripts in the "tools" directory.

No functional changes.

 * Description header formatting
 * Added missing new line at the end of a file
 * Removed extra new lines at the end of a file
1 #!/bin/bash 1 #!/bin/bash
2 -#------------------------------------------------------------------------------- 2 +# -----------------------------------------------------------------------------
3 # Builds the ONOS from source. 3 # Builds the ONOS from source.
4 -#------------------------------------------------------------------------------- 4 +# -----------------------------------------------------------------------------
5 5
6 [ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1 6 [ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1
7 . $ONOS_ROOT/tools/build/envDefaults 7 . $ONOS_ROOT/tools/build/envDefaults
......
1 #!/bin/bash 1 #!/bin/bash
2 -#------------------------------------------------------------------------------- 2 +# -----------------------------------------------------------------------------
3 # Packages ONOS distributable into onos.tar.gz 3 # Packages ONOS distributable into onos.tar.gz
4 -#------------------------------------------------------------------------------- 4 +# -----------------------------------------------------------------------------
5 5
6 [ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1 6 [ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1
7 . $ONOS_ROOT/tools/build/envDefaults 7 . $ONOS_ROOT/tools/build/envDefaults
......
1 #!/bin/bash 1 #!/bin/bash
2 -#------------------------------------------------------------------------------- 2 +# -----------------------------------------------------------------------------
3 # Launches the ONOS tests on the current cell environment. 3 # Launches the ONOS tests on the current cell environment.
4 -#------------------------------------------------------------------------------- 4 +# -----------------------------------------------------------------------------
5 5
6 [ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1 6 [ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1
7 . $ONOS_ROOT/tools/build/envDefaults 7 . $ONOS_ROOT/tools/build/envDefaults
......
1 #!/bin/bash 1 #!/bin/bash
2 -#------------------------------------------------------------------------------ 2 +# ----------------------------------------------------------------------------
3 # Selectively builds only those projects that contained modified Java files. 3 # Selectively builds only those projects that contained modified Java files.
4 -#------------------------------------------------------------------------------ 4 +# ----------------------------------------------------------------------------
5 5
6 projects=$(find $ONOS_ROOT -name '*.java' \ 6 projects=$(find $ONOS_ROOT -name '*.java' \
7 -not -path '*/openflowj/*' -and -not -path '.git/*' \ 7 -not -path '*/openflowj/*' -and -not -path '.git/*' \
......
1 #!/bin/bash 1 #!/bin/bash
2 -#------------------------------------------------------------------------------ 2 +# ----------------------------------------------------------------------------
3 # Echoes project-level directory if a Java file within is newer than the 3 # Echoes project-level directory if a Java file within is newer than the
4 # target directory. 4 # target directory.
5 -#------------------------------------------------------------------------------ 5 +# ----------------------------------------------------------------------------
6 6
7 javaFile=${1#*\/src\/*\/java/} 7 javaFile=${1#*\/src\/*\/java/}
8 basename=${1/*\//} 8 basename=${1/*\//}
...@@ -14,4 +14,3 @@ project=${src/src*/} ...@@ -14,4 +14,3 @@ project=${src/src*/}
14 target=$project/target 14 target=$project/target
15 15
16 [ $target -nt ${src}$javaFile ] || echo ${src/src*/} 16 [ $target -nt ${src}$javaFile ] || echo ${src/src*/}
17 -
......
1 #!/bin/bash 1 #!/bin/bash
2 -#------------------------------------------------------------------------------ 2 +# ----------------------------------------------------------------------------
3 # Continuously watches the Apache Karaf log; survives 'karaf clean' 3 # Continuously watches the Apache Karaf log; survives 'karaf clean'
4 -#------------------------------------------------------------------------------ 4 +# ----------------------------------------------------------------------------
5 KARAF_LOG=${KARAF_LOG:-~/apache-karaf-3.0.1/data/log/karaf.log} 5 KARAF_LOG=${KARAF_LOG:-~/apache-karaf-3.0.1/data/log/karaf.log}
6 6
7 while true; do 7 while true; do
8 [ ! -f $KARAF_LOG ] && sleep 2 && continue 8 [ ! -f $KARAF_LOG ] && sleep 2 && continue
9 tail -n 512 -f -F $KARAF_LOG 9 tail -n 512 -f -F $KARAF_LOG
10 done 10 done
11 -
......
1 #!/bin/bash 1 #!/bin/bash
2 -#------------------------------------------------------------------------------- 2 +# -----------------------------------------------------------------------------
3 # ONOS command-line client 3 # ONOS command-line client
4 -#------------------------------------------------------------------------------- 4 +# -----------------------------------------------------------------------------
5 5
6 export JAVA_HOME=${JAVA_HOME:-/usr/lib/jvm/java-7-openjdk-amd64/} 6 export JAVA_HOME=${JAVA_HOME:-/usr/lib/jvm/java-7-openjdk-amd64/}
7 7
8 cd $(dirname $0)/../apache-karaf-*/bin 8 cd $(dirname $0)/../apache-karaf-*/bin
9 ./client -h localhost "$@" 9 ./client -h localhost "$@"
10 -
......
1 #!/bin/bash 1 #!/bin/bash
2 -#------------------------------------------------------------------------------- 2 +# -----------------------------------------------------------------------------
3 # Starts ONOS Apache Karaf container 3 # Starts ONOS Apache Karaf container
4 -#------------------------------------------------------------------------------- 4 +# -----------------------------------------------------------------------------
5 5
6 export JAVA_HOME=${JAVA_HOME:-/usr/lib/jvm/java-7-openjdk-amd64/} 6 export JAVA_HOME=${JAVA_HOME:-/usr/lib/jvm/java-7-openjdk-amd64/}
7 export JAVA_OPTS="-Xms256M -Xmx2048M" 7 export JAVA_OPTS="-Xms256M -Xmx2048M"
8 8
9 cd /opt/onos 9 cd /opt/onos
10 /opt/onos/apache-karaf-3.0.1/bin/karaf "$@" 10 /opt/onos/apache-karaf-3.0.1/bin/karaf "$@"
11 -
......
1 #!/bin/bash 1 #!/bin/bash
2 -#------------------------------------------------------------------------------- 2 +# -----------------------------------------------------------------------------
3 # ONOS remote command-line client. 3 # ONOS remote command-line client.
4 -#------------------------------------------------------------------------------- 4 +# -----------------------------------------------------------------------------
5 5
6 [ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1 6 [ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1
7 . $ONOS_ROOT/tools/build/envDefaults 7 . $ONOS_ROOT/tools/build/envDefaults
......
1 #!/bin/bash 1 #!/bin/bash
2 -#------------------------------------------------------------------------------- 2 +# -----------------------------------------------------------------------------
3 # Checks the logs of the remote ONOS instance and makes sure they are clean. 3 # Checks the logs of the remote ONOS instance and makes sure they are clean.
4 -#------------------------------------------------------------------------------- 4 +# -----------------------------------------------------------------------------
5 5
6 [ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1 6 [ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1
7 . $ONOS_ROOT/tools/build/envDefaults 7 . $ONOS_ROOT/tools/build/envDefaults
......
1 #!/bin/bash 1 #!/bin/bash
2 -#------------------------------------------------------------------------------- 2 +# -----------------------------------------------------------------------------
3 # Remotely configures & starts ONOS for the first time. 3 # Remotely configures & starts ONOS for the first time.
4 -#------------------------------------------------------------------------------- 4 +# -----------------------------------------------------------------------------
5 5
6 [ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1 6 [ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1
7 . $ONOS_ROOT/tools/build/envDefaults 7 . $ONOS_ROOT/tools/build/envDefaults
...@@ -24,5 +24,4 @@ ssh $remote " ...@@ -24,5 +24,4 @@ ssh $remote "
24 echo \"onos.ip = \$(ifconfig | grep $ONOS_NIC | cut -d: -f2 | cut -d\\ -f1)\" \ 24 echo \"onos.ip = \$(ifconfig | grep $ONOS_NIC | cut -d: -f2 | cut -d\\ -f1)\" \
25 >> $ONOS_INSTALL_DIR/$KARAF_DIST/etc/system.properties 25 >> $ONOS_INSTALL_DIR/$KARAF_DIST/etc/system.properties
26 " 26 "
27 -
28 scp -q $CDEF_FILE $remote:$ONOS_INSTALL_DIR/config/ 27 scp -q $CDEF_FILE $remote:$ONOS_INSTALL_DIR/config/
......
1 #!/bin/bash 1 #!/bin/bash
2 -#------------------------------------------------------------------------------- 2 +# -----------------------------------------------------------------------------
3 # Remotely fetches the ONOS test VMs from a local share into ~/Downloads. 3 # Remotely fetches the ONOS test VMs from a local share into ~/Downloads.
4 -#------------------------------------------------------------------------------- 4 +# -----------------------------------------------------------------------------
5 5
6 [ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1 6 [ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1
7 . $ONOS_ROOT/tools/build/envDefaults 7 . $ONOS_ROOT/tools/build/envDefaults
......
1 #!/bin/bash 1 #!/bin/bash
2 -#------------------------------------------------------------------------------- 2 +# -----------------------------------------------------------------------------
3 # Launches ONOS GUI on the specified node. 3 # Launches ONOS GUI on the specified node.
4 -#------------------------------------------------------------------------------- 4 +# -----------------------------------------------------------------------------
5 5
6 [ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1 6 [ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1
7 . $ONOS_ROOT/tools/build/envDefaults 7 . $ONOS_ROOT/tools/build/envDefaults
......
1 #!/bin/bash 1 #!/bin/bash
2 -#------------------------------------------------------------------------------- 2 +# -----------------------------------------------------------------------------
3 # Remotely pushes bits to a remote node and installs ONOS on it. 3 # Remotely pushes bits to a remote node and installs ONOS on it.
4 -#------------------------------------------------------------------------------- 4 +# -----------------------------------------------------------------------------
5 5
6 [ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1 6 [ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1
7 . $ONOS_ROOT/tools/build/envDefaults 7 . $ONOS_ROOT/tools/build/envDefaults
......
1 #!/bin/bash 1 #!/bin/bash
2 -#------------------------------------------------------------------------------- 2 +# -----------------------------------------------------------------------------
3 # Remotely kills the ONOS service on the specified node. 3 # Remotely kills the ONOS service on the specified node.
4 -#------------------------------------------------------------------------------- 4 +# -----------------------------------------------------------------------------
5 5
6 [ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1 6 [ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1
7 . $ONOS_ROOT/tools/build/envDefaults 7 . $ONOS_ROOT/tools/build/envDefaults
......
1 #!/bin/bash 1 #!/bin/bash
2 -#------------------------------------------------------------------------------- 2 +# -----------------------------------------------------------------------------
3 # Monitors remote ONOS log file on the specified node. 3 # Monitors remote ONOS log file on the specified node.
4 -#------------------------------------------------------------------------------- 4 +# -----------------------------------------------------------------------------
5 5
6 [ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1 6 [ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1
7 . $ONOS_ROOT/tools/build/envDefaults 7 . $ONOS_ROOT/tools/build/envDefaults
......
1 #!/bin/bash 1 #!/bin/bash
2 -#------------------------------------------------------------------------------- 2 +# -----------------------------------------------------------------------------
3 # Remotely patches the ONOS VM to tailor its hostname. 3 # Remotely patches the ONOS VM to tailor its hostname.
4 -#------------------------------------------------------------------------------- 4 +# -----------------------------------------------------------------------------
5 5
6 [ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1 6 [ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1
7 . $ONOS_ROOT/tools/build/envDefaults 7 . $ONOS_ROOT/tools/build/envDefaults
......
1 #!/bin/bash 1 #!/bin/bash
2 -#------------------------------------------------------------------------------- 2 +# -----------------------------------------------------------------------------
3 # Pushes the local id_rsa.pub to the authorized_keys on a remote ONOS node. 3 # Pushes the local id_rsa.pub to the authorized_keys on a remote ONOS node.
4 -#------------------------------------------------------------------------------- 4 +# -----------------------------------------------------------------------------
5 5
6 [ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1 6 [ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1
7 . $ONOS_ROOT/tools/build/envDefaults 7 . $ONOS_ROOT/tools/build/envDefaults
......
1 #!/bin/bash 1 #!/bin/bash
2 -#------------------------------------------------------------------------------- 2 +# -----------------------------------------------------------------------------
3 # Pushes the specified bundle to the remote ONOS cell machines and updates it. 3 # Pushes the specified bundle to the remote ONOS cell machines and updates it.
4 -#------------------------------------------------------------------------------- 4 +# -----------------------------------------------------------------------------
5 5
6 [ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1 6 [ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1
7 . $ONOS_ROOT/tools/build/envDefaults 7 . $ONOS_ROOT/tools/build/envDefaults
......
1 #!/bin/bash 1 #!/bin/bash
2 -#------------------------------------------------------------------------------- 2 +# -----------------------------------------------------------------------------
3 # Remotely administers the ONOS service on the specified node. 3 # Remotely administers the ONOS service on the specified node.
4 -#------------------------------------------------------------------------------- 4 +# -----------------------------------------------------------------------------
5 5
6 [ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1 6 [ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1
7 . $ONOS_ROOT/tools/build/envDefaults 7 . $ONOS_ROOT/tools/build/envDefaults
......
1 #!/bin/bash 1 #!/bin/bash
2 -#------------------------------------------------------------------------------- 2 +# -----------------------------------------------------------------------------
3 # Logs in to the remote ONOS node. 3 # Logs in to the remote ONOS node.
4 -#------------------------------------------------------------------------------- 4 +# -----------------------------------------------------------------------------
5 5
6 [ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1 6 [ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1
7 . $ONOS_ROOT/tools/build/envDefaults 7 . $ONOS_ROOT/tools/build/envDefaults
......
1 #!/bin/bash 1 #!/bin/bash
2 -#------------------------------------------------------------------------------- 2 +# -----------------------------------------------------------------------------
3 # Verifies connectivity to each node in ONOS cell. 3 # Verifies connectivity to each node in ONOS cell.
4 -#------------------------------------------------------------------------------- 4 +# -----------------------------------------------------------------------------
5 5
6 [ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1 6 [ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1
7 . $ONOS_ROOT/tools/build/envDefaults 7 . $ONOS_ROOT/tools/build/envDefaults
......
1 #!/bin/bash 1 #!/bin/bash
2 -#------------------------------------------------------------------------------- 2 +# -----------------------------------------------------------------------------
3 # Remotely stops & uninstalls ONOS on the specified node. 3 # Remotely stops & uninstalls ONOS on the specified node.
4 -#------------------------------------------------------------------------------- 4 +# -----------------------------------------------------------------------------
5 5
6 [ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1 6 [ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1
7 . $ONOS_ROOT/tools/build/envDefaults 7 . $ONOS_ROOT/tools/build/envDefaults
......
1 #!/bin/bash 1 #!/bin/bash
2 -#------------------------------------------------------------------------------- 2 +# -----------------------------------------------------------------------------
3 # Update bundle on locally running karaf. 3 # Update bundle on locally running karaf.
4 -#------------------------------------------------------------------------------- 4 +# -----------------------------------------------------------------------------
5 5
6 [ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1 6 [ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1
7 . $ONOS_ROOT/tools/build/envDefaults 7 . $ONOS_ROOT/tools/build/envDefaults
......
1 #!/bin/bash 1 #!/bin/bash
2 -#------------------------------------------------------------------------------- 2 +# -----------------------------------------------------------------------------
3 # Verifies connectivity to each node in ONOS cell. 3 # Verifies connectivity to each node in ONOS cell.
4 -#------------------------------------------------------------------------------- 4 +# -----------------------------------------------------------------------------
5 5
6 [ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1 6 [ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1
7 . $ONOS_ROOT/tools/build/envDefaults 7 . $ONOS_ROOT/tools/build/envDefaults
......
1 #!/bin/bash 1 #!/bin/bash
2 -#------------------------------------------------------------------------------- 2 +# -----------------------------------------------------------------------------
3 # Waits for ONOS to reach run-level 100 on the specified remote node. 3 # Waits for ONOS to reach run-level 100 on the specified remote node.
4 -#------------------------------------------------------------------------------- 4 +# -----------------------------------------------------------------------------
5 5
6 [ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1 6 [ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1
7 . $ONOS_ROOT/tools/build/envDefaults 7 . $ONOS_ROOT/tools/build/envDefaults
......
1 #!/bin/bash 1 #!/bin/bash
2 -#------------------------------------------------------------------------------- 2 +# -----------------------------------------------------------------------------
3 # Monitors selected set of ONOS commands using the system watch command. 3 # Monitors selected set of ONOS commands using the system watch command.
4 -#------------------------------------------------------------------------------- 4 +# -----------------------------------------------------------------------------
5 5
6 [ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1 6 [ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1
7 . $ONOS_ROOT/tools/build/envDefaults 7 . $ONOS_ROOT/tools/build/envDefaults
......
...@@ -5,5 +5,3 @@ export OC1="192.168.56.101" ...@@ -5,5 +5,3 @@ export OC1="192.168.56.101"
5 export OC2="192.168.56.102" 5 export OC2="192.168.56.102"
6 6
7 export OCN="192.168.56.103" 7 export OCN="192.168.56.103"
8 -
9 -
......
...@@ -4,4 +4,3 @@ export ONOS_FEATURES="webconsole,onos-api,onos-core-trivial,onos-cli,onos-openfl ...@@ -4,4 +4,3 @@ export ONOS_FEATURES="webconsole,onos-api,onos-core-trivial,onos-cli,onos-openfl
4 4
5 export ONOS_NIC="10.128.4.*" 5 export ONOS_NIC="10.128.4.*"
6 export OC1="10.128.4.60" 6 export OC1="10.128.4.60"
7 -
......
...@@ -3,4 +3,3 @@ ...@@ -3,4 +3,3 @@
3 export ONOS_NIC=192.168.56.* 3 export ONOS_NIC=192.168.56.*
4 export OC1="192.168.56.101" 4 export OC1="192.168.56.101"
5 export OCN="192.168.56.103" 5 export OCN="192.168.56.103"
6 -
......
...@@ -6,4 +6,3 @@ export OC2="192.168.56.102" ...@@ -6,4 +6,3 @@ export OC2="192.168.56.102"
6 export OC3="192.168.56.104" 6 export OC3="192.168.56.104"
7 7
8 export OCN="192.168.56.103" 8 export OCN="192.168.56.103"
9 -
......