summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings2/etc_ppp/ip-up_down/U_Routes
blob: afefc492506ec04afb38d00f6b49d176743b484a (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
26
27
28
29
30
#!/bin/sh
exec 2> /tmp/ROUTE
set -x 
CMD=`basename $0`
FIXED=/etc/ppp/$6.fixed

case $CMD in 
  U_*)
    if [ -f $FIXED ]
    then
      # ADD FIXED routes
      grep "route add " $FIXED > /tmp/xx
    fi
    ;;
  D_*)
    if [ -f $FIXED ]
    then
      grep "route del " $FIXED > /tmp/xx
    fi
    ;;
esac 

if [ -f /tmp/xx ]
then
  . /tmp/xx
  rm /tmp/xx
fi
  
exit 0