Commit 6d2ba27d authored by Heinz N. Gies's avatar Heinz N. Gies

Set iface routes correctly

parent 441a2a42
Pipeline #14219503 passed with stage
in 6 minutes and 14 seconds
......@@ -99,8 +99,16 @@ expand_linked() {
read_routes() {
while read route gw
do
/sbin/route add "$route" -gateway "$gw"
echo "route: $route"
echo "gw: $gw"
if ifconfig "${gw}" 2> /dev/null
then
/sbin/route add "${route}" -iface "${gw}"
echo "route: $route"
echo "gw: $gw"
else
/sbin/route add "${route}" -gateway "${gw}"
echo "route: $route"
echo "gw: $gw"
fi
done < "/config/routes"
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment