Clean up options and fix of13 to use sudo for netbee
This commit is contained in:
+20
-14
@@ -198,9 +198,9 @@ function of13 {
|
|||||||
cmake .
|
cmake .
|
||||||
make
|
make
|
||||||
cd ~/
|
cd ~/
|
||||||
cp nbeesrc/bin/libn*.so /usr/local/lib
|
sudo cp nbeesrc/bin/libn*.so /usr/local/lib
|
||||||
ldconfig
|
sudo ldconfig
|
||||||
cp -R nbeesrc/include/ /usr/
|
sudo cp -R nbeesrc/include/ /usr/
|
||||||
|
|
||||||
# Resume the install:
|
# Resume the install:
|
||||||
cd ~/ofsoftswitch13
|
cd ~/ofsoftswitch13
|
||||||
@@ -409,7 +409,7 @@ function nox {
|
|||||||
#./nox_core -v -i ptcp:
|
#./nox_core -v -i ptcp:
|
||||||
}
|
}
|
||||||
|
|
||||||
# Install NOX 1.3 with tutorial files
|
# Install NOX Classic/Zaku for OpenFlow 1.3
|
||||||
function nox13 {
|
function nox13 {
|
||||||
echo "Installing NOX w/tutorial files..."
|
echo "Installing NOX w/tutorial files..."
|
||||||
|
|
||||||
@@ -567,7 +567,7 @@ function vm_clean {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function usage {
|
function usage {
|
||||||
printf 'Usage: %s [-abcdfhkmnprtvwx]\n\n' $(basename $0) >&2
|
printf '\nUsage: %s [-abcdfhkmnprtvwx03]\n\n' $(basename $0) >&2
|
||||||
|
|
||||||
printf 'This install script attempts to install useful packages\n' >&2
|
printf 'This install script attempts to install useful packages\n' >&2
|
||||||
printf 'for Mininet. It should (hopefully) work on Ubuntu 11.10+\n' >&2
|
printf 'for Mininet. It should (hopefully) work on Ubuntu 11.10+\n' >&2
|
||||||
@@ -590,40 +590,46 @@ function usage {
|
|||||||
printf -- ' -t: install o(T)her stuff\n' >&2
|
printf -- ' -t: install o(T)her stuff\n' >&2
|
||||||
printf -- ' -v: install open (V)switch\n' >&2
|
printf -- ' -v: install open (V)switch\n' >&2
|
||||||
printf -- ' -w: install OpenFlow (w)ireshark dissector\n' >&2
|
printf -- ' -w: install OpenFlow (w)ireshark dissector\n' >&2
|
||||||
printf -- ' -x: install NO(X) OpenFlow controller\n' >&2
|
printf -- ' -x: install NO(X) Classic OpenFlow controller\n' >&2
|
||||||
|
printf -- ' -0: (default) -0[fx] installs OpenFlow 1.0 versions\n' >&2
|
||||||
|
printf -- ' -3: -3[fx] installs OpenFlow 1.3 versions\n' >&2
|
||||||
exit 2
|
exit 2
|
||||||
}
|
}
|
||||||
|
|
||||||
|
OF_VERSION=1.0
|
||||||
|
|
||||||
if [ $# -eq 0 ]
|
if [ $# -eq 0 ]
|
||||||
then
|
then
|
||||||
all
|
all
|
||||||
else
|
else
|
||||||
while getopts 'abcdfghkmnoprtvwx' OPTION
|
while getopts 'abcdfhkmnprtvwx03' OPTION
|
||||||
do
|
do
|
||||||
case $OPTION in
|
case $OPTION in
|
||||||
a) all;;
|
a) all;;
|
||||||
b) cbench;;
|
b) cbench;;
|
||||||
c) kernel_clean;;
|
c) kernel_clean;;
|
||||||
d) vm_clean;;
|
d) vm_clean;;
|
||||||
f) echo -n "OpenFlow version to install? [1.0 or 1.3]: "
|
f) case $OF_VERSION in
|
||||||
read ver
|
|
||||||
case $ver in
|
|
||||||
1.0) of;;
|
1.0) of;;
|
||||||
1.3) of13;;
|
1.3) of13;;
|
||||||
*) echo "Invalid option";;
|
*) echo "Invalid OpenFlow version $OF_VERSION";;
|
||||||
esac;;
|
esac;;
|
||||||
h) usage;;
|
h) usage;;
|
||||||
k) kernel;;
|
k) kernel;;
|
||||||
m) modprobe;;
|
m) modprobe;;
|
||||||
n) mn_deps;;
|
n) mn_deps;;
|
||||||
o) nox13;;
|
|
||||||
p) pox;;
|
p) pox;;
|
||||||
r) remove_ovs;;
|
r) remove_ovs;;
|
||||||
t) other;;
|
t) other;;
|
||||||
v) ovs;;
|
v) ovs;;
|
||||||
w) wireshark;;
|
w) wireshark;;
|
||||||
x) nox;;
|
x) case $OF_VERSION in
|
||||||
|
1.0) nox;;
|
||||||
|
1.3) nox13;;
|
||||||
|
*) echo "Invalid OpenFlow version $OF_VERSION";;
|
||||||
|
esac;;
|
||||||
|
0) OF_VERSION=1.0;;
|
||||||
|
3) OF_VERSION=1.3;;
|
||||||
?) usage;;
|
?) usage;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|||||||
Reference in New Issue
Block a user