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 @@ | |||
1 | #!/bin/sh | ||
2 | exec 2> /tmp/ROUTE | ||
3 | set -x | ||
4 | CMD=`basename $0` | ||
5 | FIXED=/etc/ppp/$6.fixed | ||
6 | |||
7 | case $CMD in | ||
8 | U_*) | ||
9 | if [ -f $FIXED ] | ||
10 | then | ||
11 | # ADD FIXED routes | ||
12 | grep "route add " $FIXED > /tmp/xx | ||
13 | fi | ||
14 | ;; | ||
15 | D_*) | ||
16 | if [ -f $FIXED ] | ||
17 | then | ||
18 | grep "route del " $FIXED > /tmp/xx | ||
19 | fi | ||
20 | ;; | ||
21 | esac | ||
22 | |||
23 | if [ -f /tmp/xx ] | ||
24 | then | ||
25 | . /tmp/xx | ||
26 | rm /tmp/xx | ||
27 | fi | ||
28 | |||
29 | exit 0 | ||
30 | |||