Add -of13 switch to turn on OpenFlow 1.3 mode
[integration.git] / distributions / base / src / assemble / resources / run.sh
1 #!/bin/bash
2
3 CONTROLLER_RUNSH=`echo $0|sed "s;run.sh;run.internal.sh;"`
4 OF_FILTER=
5
6 function usage {
7     $CONTROLLER_RUNSH -help | sed 's/\[-help\]/\[-help\] \[-of13\]/' | sed "s;$CONTROLLER_RUNSH;$0;"
8     exit 1
9 }
10
11 OF13=0
12 while true ; do
13     (( i += 1 ))
14     case "${@:$i:1}" in
15         -of13) OF13=1 ;;
16         -help) usage ;;
17         "") break ;;
18     esac
19 done
20
21 # OF Filter selection
22 OF_FILTER="^(?!org.opendaylight.(openflowplugin|openflowjava)).*"
23 if [ $OF13 -ne 0 ]; then
24     OF_FILTER="^(?!org.opendaylight.controller.(thirdparty.org.openflow|protocol_plugins.openflow)).*"
25 fi
26
27 NEWARGS=`echo $@|sed 's/-of13//'`
28
29 $CONTROLLER_RUNSH -Dfelix.fileinstall.filter="$OF_FILTER" $NEWARGS