blob: 657aa661a5e8a30abe61dfe054eb416e9cca1f7e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#! /bin/bash
#
# adds static routes which go through device $1
if [ -z "$1" ]; then
echo $"usage: ifup-routes <net-device>"
exit 1
fi
[ -f "/etc/sysconfig/network-scripts/route-$1" ] || exit 0
while read line; do
/sbin/ip route add $line
done < "/etc/sysconfig/network-scripts/route-$1"
# XXX old version:
#grep "^$1[[:space:]]" /etc/sysconfig/static-routes | while read device args; do
# /sbin/route add -$args $device
#done
#grep "^any[[:space:]]" /etc/sysconfig/static-routes | while read ignore args ; do
# /sbin/route add -$args
#done
|