Diffstat (limited to 'noncore/settings/networksettings2/etc_ppp/ip-up_down/U_Routes') (more/less context) (ignore whitespace changes)
-rwxr-xr-x | noncore/settings/networksettings2/etc_ppp/ip-up_down/U_Routes | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/noncore/settings/networksettings2/etc_ppp/ip-up_down/U_Routes b/noncore/settings/networksettings2/etc_ppp/ip-up_down/U_Routes new file mode 100755 index 0000000..afefc49 --- a/dev/null +++ b/noncore/settings/networksettings2/etc_ppp/ip-up_down/U_Routes @@ -0,0 +1,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 + |