3 # Use same path for run.internal.sh
4 RUNSH_DIR=$(dirname $0)
5 CONTROLLER_RUNSH=${RUNSH_DIR}/run.internal.sh
9 # Be extra careful to pass on usage from run.internal.sh, but add our
10 # usage as well in the standard way
12 $CONTROLLER_RUNSH -help | sed 's/\[-help\]/\[-help\] \[-of13\] \[-bundlefilter \<bundlefilter\> \]/' | sed "s;$CONTROLLER_RUNSH;$0;"
22 -bundlefilter) (( i += 1 )); BUNDLEFILTER="|${@:$i:1}";;
28 # clean available optional configurations (links)
29 find configuration/initial -type l -exec rm {} \;
32 OF_FILTER="org.opendaylight.(openflowplugin|openflowjava)"
33 if (( $OF13 != 0 )); then
34 OF_FILTER="org.opendaylight.controller.(thirdparty.org.openflow|protocol_plugins.openflow)"
35 while read ofConfig; do
36 ln -s ../initial.available/$(basename ${ofConfig}) configuration/initial/
37 done < <(find configuration/initial.available -name '*openflowplugin.xml')
40 # Make sure we suck out our additional args so as to not confuse
42 NEWARGS=`echo $@|sed 's/-of13//'|sed 's/-bundlefilter[ ]*[^ ]*//'`
44 # Build the filter string
47 FILTER=${FILTERBEGINING}${OF_FILTER}${BUNDLEFILTER}${FILTERENDING}
50 $CONTROLLER_RUNSH -Dfelix.fileinstall.filter="$FILTER" $NEWARGS