diff options
Diffstat (limited to 'sdnvpn/artifacts/quagga_setup.sh')
-rw-r--r-- | sdnvpn/artifacts/quagga_setup.sh | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/sdnvpn/artifacts/quagga_setup.sh b/sdnvpn/artifacts/quagga_setup.sh index fbd229f..c6e6a9c 100644 --- a/sdnvpn/artifacts/quagga_setup.sh +++ b/sdnvpn/artifacts/quagga_setup.sh @@ -9,22 +9,22 @@ echo 'ubuntu:opnfv' | chpasswd sleep 100 # Variables to be filled in with python -NEIGHBOR_IP=$1 -OWN_IP=$2 +NEIGHBOR_IP={0} +OWN_IP={1} # directly access the instance from the external net without NAT -EXT_NET_MASK=$3 -IP_PREFIX=$4 -RD=$5 -IRT=$6 -ERT=$7 +EXT_NET_MASK={2} +IP_PREFIX={3} +RD={4} +IRT={5} +ERT={6} -if [[ $(getent hosts | awk '{print $2}') != *"$(cat /etc/hostname | awk '{print $1}')"* ]] +if [[ $(getent hosts | awk '{{print $2}}') != *"$(cat /etc/hostname | awk '{{print $1}}')"* ]] then -echo "127.0.1.1 $(cat /etc/hostname | awk '{print $1}')" | tee -a /etc/hosts +echo "127.0.1.1 $(cat /etc/hostname | awk '{{print $1}}')" | tee -a /etc/hosts fi quagga_int='' -for net_int in $(netstat -ia | awk 'NR>2{print $1}'); +for net_int in $(netstat -ia | awk 'NR>2{{print $1}}'); do if [ -z "$(ifconfig | grep $net_int)" ] then @@ -35,10 +35,10 @@ done if [ -z "$quagga_int" ] then echo 'No available network interface' -fi - +else ip link set $quagga_int up ip addr add $OWN_IP/$EXT_NET_MASK dev $quagga_int +fi # Download quagga/zrpc rpms cd /root |