8 lines
271 B
Bash
8 lines
271 B
Bash
#!/bin/sh
|
|
gateway=`getent hosts tinc | awk '{ print \$1 }'`
|
|
route="${network_address}/${global_prefix:-16}"
|
|
iface="eth0"
|
|
|
|
echo "Routing \$route to \$gateway via \$iface"
|
|
ip route add \$route via \$gateway dev \$iface || echo "Failed to add route; does it already exist?"
|