Correct PPTP server firewall rules chain.
[tomato/davidwu.git] / release / src / router / pppd / scripts / pon
blobef47518c879716c50fb3948bfbcbf428e222cf4d
1 #!/bin/sh
3 PPP_ON_BOOT=/etc/ppp/ppp_on_boot
5 case "$1" in
6 -*) echo "
7 Usage: pon [provider] [arguments]
9 If pon is invoked without arguments, $PPP_ON_BOOT file will be
10 run, presuming it exists and is executable. Otherwise, a PPP connection
11 will be started using settings from /etc/ppp/peers/provider.
12 If you specify one argument, a PPP connection will be started using
13 settings from the appropriate file in the /etc/ppp/peers/ directory, and
14 any additional arguments supplied will be passed as extra arguments to
15 pppd.
17 exit 0
19 esac
21 if [ -z "$1" -a -x "$PPP_ON_BOOT" ]; then
22 exec "$PPP_ON_BOOT"
25 if [ -z "$1" -a ! -f /etc/ppp/peers/provider ]; then
26 echo "
27 Please configure /etc/ppp/peers/provider or use a command line argument to
28 use another file in /etc/ppp/peers/ directory.
30 exit 1
33 if [ "$1" -a ! -f "/etc/ppp/peers/$1" ]; then
34 echo "
35 The file /etc/ppp/peers/$1 does not exist.
37 exit 1
40 exec /usr/sbin/pppd call ${@:-provider}