aboutsummaryrefslogtreecommitdiff
path: root/misc/openwrt/etc/hotplug.d/iface/99-ifup
blob: e3562cdcadb1351e8a286e95f6d3bba8320debdf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh

tables="mts-azov rt-azov mts-il"
net=

case "$ACTION" in
	ifup)
		case "$INTERFACE" in
			eth2)
				net=192.168.7
				;;
			eth3)
				net=192.168.8
				;;
		esac
		if [ -z "$net" ]; then exit; fi
		for t in $tables; do
			ip r add ${net}.0/24 via ${net}.1 table $t
		done
		;;
esac