summaryrefslogtreecommitdiffstats
path: root/abs/core-testing/ppp/pon
blob: 36885050b52b7ca99ef1b043d416ef519e33a386 (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
31
32
#!/bin/sh

case "$1" in
  -*) echo "
Usage: pon [provider] [arguments]

If you specify one argument, a PPP connection will be started using
settings from the appropriate file in the /etc/ppp/peers/ directory, and
any additional arguments supplied will be passed as extra arguments to
pppd.
"
      exit 0
      ;;
esac

if [ -z "$1" -a ! -f /etc/ppp/peers/provider ]; then
  echo "
Please configure /etc/ppp/peers/provider or use a command line argument to
use another file in /etc/ppp/peers/ directory.
"
  exit 1
fi

if [ "$1" -a ! -f "/etc/ppp/peers/$1" ]; then
  echo "
The file /etc/ppp/peers/$1 does not exist.
"
  exit 1
fi

exec /usr/sbin/pppd call ${@:-provider}