Ray Milkey | 922db30 | 2018-04-02 08:54:51 -0700 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | remote=$ONOS_USER@$OCN |
| 4 | |
| 5 | ssh -t $remote " |
| 6 | |
| 7 | set -euxo pipefail |
| 8 | |
| 9 | sudo killall -9 dhclient || true |
| 10 | sudo killall -9 zebra || true |
| 11 | sudo killall -9 bgpd || true |
| 12 | sudo killall -9 dhcpd || true |
| 13 | sudo killall -9 screen || true |
| 14 | |
| 15 | # Preconfigure isc-dhcp-relay for headless install |
| 16 | echo isc-dhcp-relay isc-dhcp-relay/interfaces string "" | sudo debconf-set-selections |
| 17 | echo isc-dhcp-relay isc-dhcp-relay/options string "" | sudo debconf-set-selections |
| 18 | echo isc-dhcp-relay isc-dhcp-relay/servers string "" | sudo debconf-set-selections |
| 19 | sudo apt-get update |
| 20 | sudo apt-get install -y linux-image-\$(uname -r) gawk texinfo python-pip build-essential iptables isc-dhcp-server isc-dhcp-relay |
| 21 | |
| 22 | # Make sure python dependencies are installed |
| 23 | sudo pip install ipaddress configobj |
| 24 | |
| 25 | # Setup quagga |
| 26 | # make sure quagga user exists |
| 27 | if ! grep -q -E "^quagga" /etc/group ; then |
| 28 | sudo groupadd quagga |
| 29 | fi |
| 30 | if ! id -u quagga > /dev/null 2>&1 ; then |
| 31 | sudo useradd -g quagga -s /bin/false quagga |
| 32 | fi |
| 33 | rm -rf quagga |
| 34 | git clone -b onos-1.11 https://gerrit.opencord.org/quagga |
| 35 | cd quagga |
| 36 | ./bootstrap.sh |
| 37 | ./configure --enable-fpm --sbindir=/usr/lib/quagga |
| 38 | make |
| 39 | sudo make install |
| 40 | cd .. |
| 41 | " |