This commit was manufactured by cvs2svn to create branch 'vellum_cz'.
[nethome.git] / bin / ppp9k
diff --git a/bin/ppp9k b/bin/ppp9k
deleted file mode 100755 (executable)
index 1f3316f..0000000
--- a/bin/ppp9k
+++ /dev/null
@@ -1,70 +0,0 @@
-#!/bin/sh
-#
-# $Id$
-
-# IP address for N9K, "192.168.90.1" if not provided (either here or from
-# some ~/.profile etc.)
-#NOKIA9K=
-
-# Nameserver for N9K, taken from /etc/resolv.conf if not provided
-#NS=
-
-# Serial port with attached N9K, default is /dev/ttyS1 (AKA COM2:)
-#PORT=/dev/ttyS1
-
-# Nokia baudrate, usually 19200 or 38400, default is 19200
-#NOKIABAUD=19200
-
-# No user-servicable parts below!
-
-pid="/var/run/ppp9k.pid"
-if [ -f "$pid" ];then
-       if kill -0 `head -n 1 "$pid"` 2>/dev/null;then
-               echo "Killing previous ppp9k on PID(s):" `cat "$pid"`
-               kill `cat "$pid"`
-               rm -f "$pid"
-               exit 0
-       else
-               echo "Removing state lock of PID(s):" `cat "$pid"`
-               rm -f "$pid"
-       fi
-fi
-
-IP="${NOKIA9K:-192.168.90.1}"
-NS="`grep '^nameserver' /etc/resolv.conf|head -n 1|cut -f 2 -d ' '`"
-NS="${NS:-127.0.0.1}"
-if [ "$NS" = localhost -o "${NS#127.}" != "$NS" ];then NS="`hostname -f`";fi
-PORT="${PORT:-ttyS1}"
-if [ "${PORT#*/}" = "$PORT" ];then PORT="/dev/$PORT";fi
-NOKIABAUD="${NOKIABAUD:-19200}"
-
-# Some rules for the chat script:
-# 9000i starts with: ATZ, AT&F  (the need for TIMEOUT 2, "-OK^M^J-AT&F")
-# 9110  starts with:      AT&F
-# user can have global     custom initialization string (need for one "OK^M^J")
-# user can have connection custom initialization string (need for one "OK^M^J")
-
-(trap "" HUP
-       while [ '!' -f "$pid" ];do sleep 1;done
-       me="`cat "$pid"`"
-       while :;do
-               pppd "$PORT" "$NOKIABAUD" modem lock -crtscts xonxoff :$IP asyncmap 0 ms-dns "$NS" \
-                       connect 'chat -v                              \
-                               "TIMEOUT" "86400"                     \
-                               "AT"      "\c"                        \
-                               "TIMEOUT" "2"                         \
-                               "&F-OK^M^J-AT&F" "OK^M^JOK^M^JOK^M^J" \
-                               "TIMEOUT" "20"                        \
-                               "ATD"     "CONNECT^M^J"               \
-                               ' \
-                       -ccp nodefaultroute proxyarp lcp-echo-interval 30 lcp-echo-failure 2 lcp-max-configure 30 -detach \
-                       -chap noauth "$@" &
-               echo -e "$me\n$!" >"$pid"
-               wait
-               echo "$me" >"$pid"
-               sleep 10
-       done) </dev/null &>/dev/null &
-
-he="$!"
-echo "$he" >"$pid"
-echo "Starting up: PID=$he, port=$PORT, baud=$NOKIABAUD, remoteIP=$IP, nameserver=$NS"