-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup-devices.sh
More file actions
executable file
·47 lines (41 loc) · 1.12 KB
/
setup-devices.sh
File metadata and controls
executable file
·47 lines (41 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/usr/bin/env sh
# determine whether we are on a NUC or on a TPLINK
opkg_path=`which opkg`
if [ -z "$opkg_path" ]; then
tplink=0
SUDO=sudo
else
tplink=1
SUDO=""
fi
if [ $tplink -eq 1 ]; then
opkg install python python-pip
else
sudo apt-get install -y python python-pip
sudo pip install setuptools
sudo service ntp start
cd olsr_utilities
make clean; make
sudo rm -f /usr/bin/topology_dumper
sudo rm -f /usr/bin/start_topology_dumper
sudo rm -f /usr/bin/runat
sudo rm -f /usr/bin/rt_dumper.py
sudo ln -s $PWD/topology_dumper /usr/bin/topology_dumper
sudo ln -s $PWD/start_topology_dumper /usr/bin/start_topology_dumper
sudo ln -s $PWD/runat /usr/bin/runat
sudo ln -s $PWD/rt_dumper.py /usr/bin/rt_dumper.py
cd ../
${SUDO} pip install scipy
fi
${SUDO} pip install pyric pyroute2 ipaddr netdiff
${SUDO} pip install networkx==1.11
# patch a mistake in the official release of pyric
if [ $tplink -eq 1 ]; then
sed -i -e "s/'sys/'\/sys/g" /usr/lib/python2.7/site-packages/pyric/utils/rfkill.py
fi
# install olsrd2
./setup-olsr.sh
# install Prince
./setup-prince.sh
# install poprow wishful scripts
./install-wishful-poprow.sh