wok view ppp/stuff/pppnc-server @ rev 16082

ARM: add xcb-util ttf-dejavu xorg-setxkbmap
author Christophe Lincoln <pankso@slitaz.org>
date Sat Mar 15 20:54:02 2014 +0100 (2014-03-15)
parents
children 56c606af68bc
line source
1 #!/bin/sh
3 ppp="/usr/sbin/pppd local noauth nodetach"
4 port=1111
5 ipupd=/etc/ppp/ip-up.d
7 case "$0" in
8 *server) # Usage: pppnc-server [port] [localip:remoteip]
9 n=10.$(($$%256)).$(($$/256))
10 exec $ppp ${2:-$n.1:$n.2} passive proxyarp pty "nc -lp ${1:-$port}"
11 esac
13 [ -z "$1" ] && echo "Usage: $0 serverip [port] [routes]" && exit 1
14 for i in $3 ; do
15 echo "route add -net $i dev \$1"
16 done > $ipupd/pppnc$$
17 chmod +x $ipupd/pppnc$$
18 $ppp noipdefault pty "nc $1 ${2:-$port}" ipparam pppnc$$
19 rm -f $ipupd/pppnc$$