aboutsummaryrefslogtreecommitdiffstats
path: root/resources/tools/testbed-setup/ansible/roles/virl/files/virl/ifup
blob: a4a743ac6345ae80bdd421cf707e7eaf7fedeedd (plain)
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
#! /bin/sh
# Reload the OpenSSH server when an interface comes up, to allow it to start
# listening on new addresses.

set -e

# Don't bother to restart sshd when lo is configured.
if [ "$IFACE" = lo ]; then
	exit 0
fi

# Only run from ifup.
if [ "$MODE" != start ]; then
	exit 0
fi

if [ "$IFACE" = br1 ]; then
	/sbin/ip route delete default
	/sbin/ip route add default via 10.30.51.1
	/sbin/ifconfig br1:0 {{ virl_l2_ip }} netmask 255.255.255.0
	exit 0
fi


exit 0