tutorial fixes
diff --git a/onos-setup-lxc.sh b/onos-setup-lxc.sh
index ebfe361..2a85853 100644
--- a/onos-setup-lxc.sh
+++ b/onos-setup-lxc.sh
@@ -164,6 +164,8 @@
. ${ONOS_ROOT}/tools/dev/bash_profile
. ${ONOS_ROOT}/tools/build/envDefaults
+sudo mn -c
+
cell 3node
onos-service --cell stop
cell 1node
@@ -182,6 +184,8 @@
. ${ONOS_ROOT}/tools/dev/bash_profile
. ${ONOS_ROOT}/tools/build/envDefaults
+sudo mn -c
+
cell 3node
onos-service --cell stop
onos-package
@@ -215,7 +219,7 @@
create_user optical "Optical Tutorial"
OPT_URL='https://gerrit.onosproject.org/gitweb?p=onos-vm.git;a=blob_plain;hb=refs/heads/new-onos-tutorial;f=opt-setup-lxc.sh'
-wget -O opt-setup.sh $OPT_URL
+wget -O opt-setup-lxc.sh $OPT_URL
sudo -u optical -H sh -c 'cp opt-setup-lxc.sh ~/ && cd ~/ && sh opt-setup-lxc.sh'
# ------------- Zero Unused Blocks -------------
diff --git a/opt-setup-lxc.sh b/opt-setup-lxc.sh
index 0c5a6af..7887d15 100644
--- a/opt-setup-lxc.sh
+++ b/opt-setup-lxc.sh
@@ -20,6 +20,8 @@
Comment[en_US]=
EOF
+
+
cat > "${DESKTOP}/Mininet Small" << EOF
[Desktop Entry]
Encoding=UTF-8
@@ -27,7 +29,7 @@
Name=Mininet Small
Name[en_US]=Mininet Small
Icon=konsole
-Exec=/usr/bin/lxterminal -t 'Mininet Small Topology' -e 'sudo -E python /home/mininet/onos/tools/test/topos/opticalTest.py'
+Exec=/usr/bin/lxterminal -t 'Mininet Small Topology' -e '/bin/bash -c "export ONOS_ROOT=~/onos ; sudo -E python /home/mininet/onos/tools/test/topos/opticalTest.py 10.0.3.11"'
Comment[en_US]=
EOF
@@ -38,7 +40,7 @@
Name=Mininet Large
Name[en_US]=Mininet Large
Icon=konsole
-Exec=/usr/bin/lxterminal -t 'Mininet Large Topology' -e 'sudo -E python /home/mininet/onos/tools/test/topos/opticalTestBig.py'
+Exec=/usr/bin/lxterminal -t 'Mininet Large Topology' -e '/bin/bash -c "export ONOS_ROOT=~/onos ; sudo -E python /home/mininet/onos/tools/test/topos/opticalTestBig.py 10.0.3.11"'
Comment[en_US]=
EOF
@@ -110,6 +112,9 @@
Comment[en_US]=
EOF
+ln -s /home/mininet/onos onos
+ln -s /home/mininet/.m2 .m2
+
# -------------- Setup LINC & dependencies ---------------
git clone https://github.com/FlowForwarding/LINC-config-generator.git
cd ~/LINC-config-generator
diff --git a/sdnip-setup-lxc.sh b/sdnip-setup-lxc.sh
index beeb7b6..fbcf901 100644
--- a/sdnip-setup-lxc.sh
+++ b/sdnip-setup-lxc.sh
@@ -11,6 +11,11 @@
sudo -u mininet sh -c 'cp -r /home/sdnip/sdnip/configs/addresses.json /home/mininet/onos/tools/package/config'
sudo -u mininet sh -c 'cp -r /home/sdnip/sdnip/configs/sdnip.json /home/mininet/onos/tools/package/config'
+
+#--------------- Add iptables rule for BGP-ONOS communication -----
+
+echo \"sudo iptables -A PREROUTING -t nat -i root-eth0 -p tcp --dport 2000 -j DNAT --to 10.0.3.11:2000 \" >> /home/sdnip/.bashrc"
+
DESKTOP=/home/${USER}/Desktop
mkdir -p ${DESKTOP}