~koalinux/charms/trusty/neutron-contrail/vhost-phy

« back to all changes in this revision

Viewing changes to scripts/create-vrouter.sh

  • Committer: Robert Ayres
  • Date: 2017-07-21 20:47:30 UTC
  • Revision ID: robert.ayres@canonical.com-20170721204730-glw7xe9e4rdq0x5z
Restore network routes when bringing up dpdk vhost0

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
                echo "iface vhost0 inet dhcp"
30
30
        fi
31
31
        if [ -n "$1" ]; then
32
 
                echo "    post-up ip link set vhost0 address $(cat /sys/class/net/$2/address)"
 
32
                cat <<-EOF
 
33
                            post-up ip link set vhost0 address $(cat /sys/class/net/$2/address)
 
34
                            post-up [ -e /etc/network/routes ] \\
 
35
                               && { service networking-routes stop; service networking-routes start; }
 
36
                        EOF
33
37
        else
34
38
                cat <<-EOF
35
39
                            pre-up ip link add address \$(cat /sys/class/net/$2/address) type vhost