summaryrefslogtreecommitdiffstats
path: root/patches/source/ppp
diff options
context:
space:
mode:
author Patrick J Volkerding <volkerdi@slackware.com>2018-05-25 23:29:36 +0000
committer Eric Hameleers <alien@slackware.com>2018-05-31 15:18:32 -0700
commit8ff4f2f51a6cf07fc33742ce3bee81328896e49b (patch)
tree4a166b8389404be98a6c098babaa444e2dec8f48 /patches/source/ppp
parent76fc4757ac91ac7947a01fb7b53dddf9a78a01d1 (diff)
downloadcurrent-8ff4f2f51a6cf07fc33742ce3bee81328896e49b.tar.gz
current-8ff4f2f51a6cf07fc33742ce3bee81328896e49b.tar.xz
Fri May 25 23:29:36 UTC 201814.1
patches/packages/glibc-zoneinfo-2018e-noarch-2_slack14.1.txz: Rebuilt. Handle removal of US/Pacific-New timezone. If we see that the machine is using this, it will be automatically switched to US/Pacific.
Diffstat (limited to 'patches/source/ppp')
-rw-r--r--patches/source/ppp/doinst.sh21
-rw-r--r--patches/source/ppp/options.new276
-rw-r--r--patches/source/ppp/ppp.CVE-2014-3158.diff30
-rw-r--r--patches/source/ppp/ppp.CVE-2015-3310.diff11
-rwxr-xr-xpatches/source/ppp/ppp.SlackBuild176
-rw-r--r--patches/source/ppp/ppp.crypt.diff64
-rw-r--r--patches/source/ppp/ppp.slack.diff28
-rw-r--r--patches/source/ppp/pppsetup-1.98.backupfiles.diff26
-rw-r--r--patches/source/ppp/pppsetup-1.98.moredevs.diff105
-rw-r--r--patches/source/ppp/pppsetup-1.98.pppoff.diff19
-rw-r--r--patches/source/ppp/pppsetup-1.98.slack.diff1709
-rw-r--r--patches/source/ppp/radius.msdict81
-rw-r--r--patches/source/ppp/realms22
-rw-r--r--patches/source/ppp/servers4
-rw-r--r--patches/source/ppp/slack-desc19
15 files changed, 2591 insertions, 0 deletions
diff --git a/patches/source/ppp/doinst.sh b/patches/source/ppp/doinst.sh
new file mode 100644
index 000000000..54facc41c
--- /dev/null
+++ b/patches/source/ppp/doinst.sh
@@ -0,0 +1,21 @@
+#!/bin/sh
+config() {
+ NEW="$1"
+ OLD="`dirname $NEW`/`basename $NEW .new`"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+config etc/ppp/chap-secrets.new
+config etc/ppp/options.new
+config etc/ppp/pap-secrets.new
+
+config etc/radiusclient/issue.new
+config etc/radiusclient/radiusclient.conf.new
+config etc/radiusclient/realms.new
+config etc/radiusclient/servers.new
+
diff --git a/patches/source/ppp/options.new b/patches/source/ppp/options.new
new file mode 100644
index 000000000..2a0286576
--- /dev/null
+++ b/patches/source/ppp/options.new
@@ -0,0 +1,276 @@
+# /etc/ppp/options
+#
+# $Id: options,v 1.4 1996/05/01 18:57:04 alvar Exp $
+#
+# Originally created by Jim Knoble <jmknoble@mercury.interpath.net>
+# Modified for Debian by alvar Bray <alvar@meiko.co.uk>
+# Modified for PPP Server setup by Christoph Lameter <clameter@debian.org>
+# Modified for Slackware by Pat Volkerding <volkerdi@slackware.com>
+#
+# Use the command egrep -v '#|^ *$' /etc/ppp/options to quickly see what
+# options are active in this file.
+
+# Specify which DNS Servers the incoming Win95 or WinNT Connection should use
+# Two Servers can be remotely configured
+# dns-addr 192.168.1.1
+# dns-addr 192.168.1.2
+
+# Specify which WINS Servers the incoming connection Win95 or WinNT should use
+# wins-addr 192.168.1.50
+# wins-addr 192.168.1.51
+
+# Run the executable or shell command specified after pppd has
+# terminated the link. This script could, for example, issue commands
+# to the modem to cause it to hang up if hardware modem control signals
+# were not available.
+#disconnect "chat -- \d+++\d\c OK ath0 OK"
+
+# async character map -- 32-bit hex; each bit is a character
+# that needs to be escaped for pppd to receive it. 0x00000001
+# represents '\x01', and 0x80000000 represents '\x1f'.
+asyncmap 0
+
+# Require the peer to authenticate itself before allowing network
+# packets to be sent or received.
+# For a PPP Server with script based logins not using PAP or CHAP
+# you need to disable this setting.
+#auth
+
+# Do not require the other end of the connection to authenticate itself.
+# This option is dangerous if pppd is setuid.
+# If you also have ethernet and are having problems getting PPP to connect
+# over a modem, try this option.
+#noauth
+
+# Use hardware flow control (i.e. RTS/CTS) to control the flow of data
+# on the serial port.
+crtscts
+
+# Use software flow control (i.e. XON/XOFF) to control the flow of data
+# on the serial port.
+#xonxoff
+
+# Specifies that certain characters should be escaped on transmission
+# (regardless of whether the peer requests them to be escaped with its
+# async control character map). The characters to be escaped are
+# specified as a list of hex numbers separated by commas. Note that
+# almost any character can be specified for the escape option, unlike
+# the asyncmap option which only allows control characters to be
+# specified. The characters which may not be escaped are those with hex
+# values 0x20 - 0x3f or 0x5e.
+#escape 11,13,ff
+
+# Don't use the modem control lines.
+#local
+
+# Specifies that pppd should use a UUCP-style lock on the serial device
+# to ensure exclusive access to the device.
+lock
+
+# Use the modem control lines. On Ultrix, this option implies hardware
+# flow control, as for the crtscts option. (This option is not fully
+# implemented.)
+modem
+
+# Set the MRU [Maximum Receive Unit] value to <n> for negotiation. pppd
+# will ask the peer to send packets of no more than <n> bytes. The
+# minimum MRU value is 128. The default MRU value is 1500. A value of
+# 296 is recommended for slow links (40 bytes for TCP/IP header + 256
+# bytes of data).
+#mru 542
+
+# Set the interface netmask to <n>, a 32 bit netmask in "decimal dot"
+# notation (e.g. 255.255.255.0).
+#netmask 255.255.255.0
+
+# Disables the default behaviour when no local IP address is specified,
+# which is to determine (if possible) the local IP address from the
+# hostname. With this option, the peer will have to supply the local IP
+# address during IPCP negotiation (unless it specified explicitly on the
+# command line or in an options file).
+#noipdefault
+
+# Enables the "passive" option in the LCP. With this option, pppd will
+# attempt to initiate a connection; if no reply is received from the
+# peer, pppd will then just wait passively for a valid LCP packet from
+# the peer (instead of exiting, as it does without this option).
+#passive
+
+# With this option, pppd will not transmit LCP packets to initiate a
+# connection until a valid LCP packet is received from the peer (as for
+# the "passive" option with old versions of pppd).
+#silent
+
+# Don't request or allow negotiation of any options for LCP and IPCP
+# (use default values).
+#-all
+
+# Disable Address/Control compression negotiation (use default, i.e.
+# address/control field disabled).
+#-ac
+
+# Disable asyncmap negotiation (use the default asyncmap, i.e. escape
+# all control characters).
+#-am
+
+# Don't fork to become a background process (otherwise pppd will do so
+# if a serial device is specified).
+#-detach
+
+# Disable IP address negotiation (with this option, the remote IP
+# address must be specified with an option on the command line or in an
+# options file).
+#-ip
+
+# Disable magic number negotiation. With this option, pppd cannot
+# detect a looped-back line.
+#-mn
+
+# Disable MRU [Maximum Receive Unit] negotiation (use default, i.e.
+# 1500).
+#-mru
+
+# Disable protocol field compression negotiation (use default, i.e.
+# protocol field compression disabled).
+#-pc
+
+# Require the peer to authenticate itself using PAP.
+#+pap
+
+# Don't agree to authenticate using PAP.
+#-pap
+
+# Require the peer to authenticate itself using CHAP [Cryptographic
+# Handshake Authentication Protocol] authentication.
+#+chap
+
+# Don't agree to authenticate using CHAP.
+#-chap
+
+# Disable negotiation of Van Jacobson style IP header compression (use
+# default, i.e. no compression).
+#-vj
+
+# Increase debugging level (same as -d). If this option is given, pppd
+# will log the contents of all control packets sent or received in a
+# readable form. The packets are logged through syslog with facility
+# daemon and level debug. This information can be directed to a file by
+# setting up /etc/syslog.conf appropriately (see syslog.conf(5)). (If
+# pppd is compiled with extra debugging enabled, it will log messages
+# using facility local2 instead of daemon).
+#debug
+
+# Append the domain name <d> to the local host name for authentication
+# purposes. For example, if gethostname() returns the name porsche,
+# but the fully qualified domain name is porsche.Quotron.COM, you would
+# use the domain option to set the domain name to Quotron.COM.
+#domain <d>
+
+# Enable debugging code in the kernel-level PPP driver. The argument n
+# is a number which is the sum of the following values: 1 to enable
+# general debug messages, 2 to request that the contents of received
+# packets be printed, and 4 to request that the contents of transmitted
+# packets be printed.
+#kdebug n
+
+# Set the MTU [Maximum Transmit Unit] value to <n>. Unless the peer
+# requests a smaller value via MRU negotiation, pppd will request that
+# the kernel networking code send data packets of no more than n bytes
+# through the PPP network interface.
+#mtu <n>
+
+# Enforce the use of the hostname as the name of the local system for
+# authentication purposes (overrides the name option).
+#usehostname
+
+# Set the assumed name of the remote system for authentication purposes
+# to <n>.
+#remotename <n>
+
+# Add an entry to this system's ARP [Address Resolution Protocol]
+# table with the IP address of the peer and the Ethernet address of this
+# system.
+proxyarp
+
+# Use the system password database for authenticating the peer using
+# PAP. Note: mgetty already provides this option. If this is specified
+# then dialin from users using a script under Linux to fire up ppp wont work.
+# login
+
+# If this option is given, pppd will send an LCP echo-request frame to
+# the peer every n seconds. Under Linux, the echo-request is sent when
+# no packets have been received from the peer for n seconds. Normally
+# the peer should respond to the echo-request by sending an echo-reply.
+# This option can be used with the lcp-echo-failure option to detect
+# that the peer is no longer connected.
+lcp-echo-interval 30
+
+# If this option is given, pppd will presume the peer to be dead if n
+# LCP echo-requests are sent without receiving a valid LCP echo-reply.
+# If this happens, pppd will terminate the connection. Use of this
+# option requires a non-zero value for the lcp-echo-interval parameter.
+# This option can be used to enable pppd to terminate after the physical
+# connection has been broken (e.g., the modem has hung up) in
+# situations where no hardware modem control lines are available.
+lcp-echo-failure 4
+
+# Set the LCP restart interval (retransmission timeout) to <n> seconds
+# (default 3).
+#lcp-restart <n>
+
+# Set the maximum number of LCP terminate-request transmissions to <n>
+# (default 3).
+#lcp-max-terminate <n>
+
+# Set the maximum number of LCP configure-request transmissions to <n>
+# (default 10).
+#lcp-max-configure <n>
+
+# Set the maximum number of LCP configure-NAKs returned before starting
+# to send configure-Rejects instead to <n> (default 10).
+#lcp-max-failure <n>
+
+# Set the IPCP restart interval (retransmission timeout) to <n>
+# seconds (default 3).
+#ipcp-restart <n>
+
+# Set the maximum number of IPCP terminate-request transmissions to <n>
+# (default 3).
+#ipcp-max-terminate <n>
+
+# Set the maximum number of IPCP configure-request transmissions to <n>
+# (default 10).
+#ipcp-max-configure <n>
+
+# Set the maximum number of IPCP configure-NAKs returned before starting
+# to send configure-Rejects instead to <n> (default 10).
+#ipcp-max-failure <n>
+
+# Set the PAP restart interval (retransmission timeout) to <n> seconds
+# (default 3).
+#pap-restart <n>
+
+# Set the maximum number of PAP authenticate-request transmissions to
+# <n> (default 10).
+#pap-max-authreq <n>
+
+# Set the CHAP restart interval (retransmission timeout for
+# challenges) to <n> seconds (default 3).
+#chap-restart <n>
+
+# Set the maximum number of CHAP challenge transmissions to <n>
+# (default 10).
+#chap-max-challenge
+
+# If this option is given, pppd will rechallenge the peer every <n>
+# seconds.
+#chap-interval <n>
+
+# With this option, pppd will accept the peer's idea of our local IP
+# address, even if the local IP address was specified in an option.
+#ipcp-accept-local
+
+# With this option, pppd will accept the peer's idea of its (remote) IP
+# address, even if the remote IP address was specified in an option.
+#ipcp-accept-remote
+
diff --git a/patches/source/ppp/ppp.CVE-2014-3158.diff b/patches/source/ppp/ppp.CVE-2014-3158.diff
new file mode 100644
index 000000000..500ca18ef
--- /dev/null
+++ b/patches/source/ppp/ppp.CVE-2014-3158.diff
@@ -0,0 +1,30 @@
+diff --git a/pppd/options.c b/pppd/options.c
+index 45fa742..e9042d1 100644
+--- a/pppd/options.c
++++ b/pppd/options.c
+@@ -1289,9 +1289,10 @@ getword(f, word, newlinep, filename)
+ /*
+ * Store the resulting character for the escape sequence.
+ */
+- if (len < MAXWORDLEN-1)
++ if (len < MAXWORDLEN) {
+ word[len] = value;
+- ++len;
++ ++len;
++ }
+
+ if (!got)
+ c = getc(f);
+@@ -1329,9 +1330,10 @@ getword(f, word, newlinep, filename)
+ /*
+ * An ordinary character: store it in the word and get another.
+ */
+- if (len < MAXWORDLEN-1)
++ if (len < MAXWORDLEN) {
+ word[len] = c;
+- ++len;
++ ++len;
++ }
+
+ c = getc(f);
+ }
diff --git a/patches/source/ppp/ppp.CVE-2015-3310.diff b/patches/source/ppp/ppp.CVE-2015-3310.diff
new file mode 100644
index 000000000..ecf53ce49
--- /dev/null
+++ b/patches/source/ppp/ppp.CVE-2015-3310.diff
@@ -0,0 +1,11 @@
+--- ./pppd/plugins/radius/util.c.orig 2015-04-17 11:43:59.687374237 -0500
++++ ./pppd/plugins/radius/util.c 2015-04-17 11:45:12.612379499 -0500
+@@ -77,7 +77,7 @@
+ static unsigned short int cnt = 0;
+ sprintf (buf, "%08lX%04X%02hX",
+ (unsigned long int) time (NULL),
+- (unsigned int) getpid (),
++ (unsigned int) getpid () % 65535,
+ cnt & 0xFF);
+ cnt++;
+ return buf;
diff --git a/patches/source/ppp/ppp.SlackBuild b/patches/source/ppp/ppp.SlackBuild
new file mode 100755
index 000000000..f2a493a29
--- /dev/null
+++ b/patches/source/ppp/ppp.SlackBuild
@@ -0,0 +1,176 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010, 2013 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+VERSION=2.4.5
+RADVER=0.3.2
+PPPVER=1.98
+BUILD=${BUILD:-3_slack14.1}
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+if [ "$ARCH" = "x86_64" ]; then
+ LIBDIRSUFFIX="64"
+else
+ LIBDIRSUFFIX=""
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-ppp
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+echo "+============+"
+echo "| ppp-$VERSION |"
+echo "+============+"
+cd $TMP
+rm -rf ppp-$VERSION
+tar xvf $CWD/ppp-$VERSION.tar.bz2 || exit 1
+cd ppp-$VERSION || exit 1
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+zcat $CWD/ppp.slack.diff.gz | patch -p1 --verbose --backup --suffix=.orig || exit 1
+sed -i -e "s#lib/pppd#lib${LIBDIRSUFFIX}/pppd#g" $(grep -lr 'lib/pppd' *)
+zcat $CWD/ppp.crypt.diff.gz | patch -p1 --verbose || exit 1
+
+zcat $CWD/ppp.CVE-2014-3158.diff.gz | patch -p1 --verbose || exit 1
+zcat $CWD/ppp.CVE-2015-3310.diff.gz | patch -p1 --verbose || exit 1
+
+# This conflicts with the header in 3.5+ kernels:
+rm -f include/linux/if_pppol2tp.h
+
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX}
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG/usr
+
+mv $PKG/usr/share/man $PKG/usr
+rmdir $PKG/usr/share
+
+# Install PPP config files:
+mkdir -p $PKG/etc/ppp
+cp -a etc.ppp/* $PKG/etc/ppp
+chmod 600 $PKG/etc/ppp/*secrets
+( cd $PKG/etc/ppp
+ mv chap-secrets chap-secrets.new
+ mv options options.new
+ mv pap-secrets pap-secrets.new
+)
+zcat $CWD/options.new.gz > $PKG/etc/ppp/options.new
+
+# Fix what seems like an insecure default setting.
+# Feel free to "chmod 4750 pppoatm.so rp-pppoe.so" at your own risk.
+# Since they are only runnable by group root, the risk really isn't much...
+chmod 755 $PKG/usr/lib${LIBDIRSUFFIX}/pppd/*/*.so
+
+mkdir -p $PKG/usr/doc/ppp-$VERSION
+cp -a \
+ FAQ PLUGINS README* SETUP scripts \
+ $PKG/usr/doc/ppp-$VERSION
+
+echo "+====================+"
+echo "| radiusclient-$RADVER |"
+echo "+====================+"
+cd $TMP
+rm -rf radiusclient-$RADVER
+tar xf $CWD/radiusclient-$RADVER.tar.bz2 || exit 1
+cd radiusclient-$RADVER || exit 1
+chown -R root:root .
+#cp /usr/share/libtool/config.{guess,sub} . # libtool-1.x
+cp /usr/share/libtool/config/config.{guess,sub} . # libtool-2.x
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+zcat $CWD/radius.msdict.gz > $PKG/etc/radiusclient/dictionary.microsoft
+zcat $CWD/realms.gz > $PKG/etc/radiusclient/realms
+zcat $CWD/servers.gz > $PKG/etc/radiusclient/servers
+( cd $PKG/etc/radiusclient
+ chmod 600 realms servers
+ mv issue issue.new
+ mv radiusclient.conf radiusclient.conf.new
+ mv realms realms.new
+ mv servers servers.new
+)
+mkdir -p $PKG/usr/doc/radiusclient-$RADVER
+cp -a \
+ BUGS CHANGES COPYRIGHT README README.radexample doc/instop.html \
+ $PKG/usr/doc/radiusclient-$RADVER
+chmod 644 $PKG/usr/doc/radiusclient-$RADVER/*
+
+echo "+===============+"
+echo "| pppsetup-$PPPVER |"
+echo "+===============+"
+cd $TMP
+rm -rf pppsetup-$PPPVER
+tar xvf $CWD/pppsetup-$PPPVER.tar.gz || exit 1
+cd pppsetup-$PPPVER || exit 1
+chown -R root:root .
+zcat $CWD/pppsetup-1.98.slack.diff.gz | patch -p1 --backup || exit
+zcat $CWD/pppsetup-1.98.pppoff.diff.gz | patch -p0 --backup || exit
+zcat $CWD/pppsetup-1.98.moredevs.diff.gz | patch -p1 --backup || exit
+zcat $CWD/pppsetup-1.98.backupfiles.diff.gz | patch -p1 --backup || exit
+chmod 755 ppp-off pppsetup
+cp -a ppp-off pppsetup $PKG/usr/sbin
+mkdir -p $PKG/usr/doc/pppsetup
+cp -a \
+ README.pppsetup ppp-compile.txt pppsetup-$PPPVER.README pppsetup-$PPPVER.lsm \
+ $PKG/usr/doc/pppsetup
+
+( cd $PKG
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . -name "*.a" | xargs file | grep "ar archive" | cut -f 1 -d : | xargs strip -g 2> /dev/null
+)
+
+chmod 755 $PKG/usr/sbin/*
+
+gzip -9 $PKG/usr/man/man?/*.?
+chmod 644 $PKG/usr/man/man?/*
+
+mkdir -p $PKG/install
+zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+# Build the package:
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/ppp-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/ppp/ppp.crypt.diff b/patches/source/ppp/ppp.crypt.diff
new file mode 100644
index 000000000..2e39af2b1
--- /dev/null
+++ b/patches/source/ppp/ppp.crypt.diff
@@ -0,0 +1,64 @@
+From 04c4348108d847e034dd91066cc6843f60d71731 Mon Sep 17 00:00:00 2001
+From: Paul Mackerras <paulus@samba.org>
+Date: Sun, 20 May 2012 14:14:55 +1000
+Subject: [PATCH] pppd: Don't crash if crypt() returns NULL
+
+It is possible for crypt() to return NULL under some circumstances,
+so we need to check the return value before passing it to strcmp().
+If we do get NULL from crypt(), treat it as an authentication failure.
+
+Reported-by: Paul Wouters <pwouters@redhat.com>
+Signed-off-by: Paul Mackerras <paulus@samba.org>
+---
+ pppd/auth.c | 8 +++++---
+ pppd/session.c | 7 +++++--
+ 2 files changed, 10 insertions(+), 5 deletions(-)
+
+diff --git a/pppd/auth.c b/pppd/auth.c
+index fb71944..883b7f5 100644
+--- a/pppd/auth.c
++++ b/pppd/auth.c
+@@ -1442,9 +1442,11 @@ check_passwd(unit, auser, userlen, apasswd, passwdlen, msg)
+ }
+ if (secret[0] != 0 && !login_secret) {
+ /* password given in pap-secrets - must match */
+- if ((cryptpap || strcmp(passwd, secret) != 0)
+- && strcmp(crypt(passwd, secret), secret) != 0)
+- ret = UPAP_AUTHNAK;
++ if (cryptpap || strcmp(passwd, secret) != 0) {
++ char *cbuf = crypt(passwd, secret);
++ if (!cbuf || strcmp(cbuf, secret) != 0)
++ ret = UPAP_AUTHNAK;
++ }
+ }
+ }
+ fclose(f);
+diff --git a/pppd/session.c b/pppd/session.c
+index 32901a2..56385dd 100644
+--- a/pppd/session.c
++++ b/pppd/session.c
+@@ -178,6 +178,7 @@ session_start(flags, user, passwd, ttyName, msg)
+ bool try_session = 0;
+ #else /* #ifdef USE_PAM */
+ struct passwd *pw;
++ char *cbuf;
+ #ifdef HAS_SHADOW
+ struct spwd *spwd;
+ struct spwd *getspnam();
+@@ -348,8 +349,10 @@ session_start(flags, user, passwd, ttyName, msg)
+ /*
+ * If no passwd, don't let them login if we're authenticating.
+ */
+- if (pw->pw_passwd == NULL || strlen(pw->pw_passwd) < 2
+- || strcmp(crypt(passwd, pw->pw_passwd), pw->pw_passwd) != 0)
++ if (pw->pw_passwd == NULL || strlen(pw->pw_passwd) < 2)
++ return SESSION_FAILED;
++ cbuf = crypt(passwd, pw->pw_passwd);
++ if (!cbuf || strcmp(cbuf, pw->pw_passwd) != 0)
+ return SESSION_FAILED;
+ }
+
+--
+1.7.10.4
+
+
diff --git a/patches/source/ppp/ppp.slack.diff b/patches/source/ppp/ppp.slack.diff
new file mode 100644
index 000000000..dafd0d3e7
--- /dev/null
+++ b/patches/source/ppp/ppp.slack.diff
@@ -0,0 +1,28 @@
+diff -r -u ppp-2.4.2.orig/pppd/Makefile.linux ppp-2.4.2/pppd/Makefile.linux
+--- ppp-2.4.2.orig/pppd/Makefile.linux 2003-11-27 13:55:19.000000000 -0800
++++ ppp-2.4.2/pppd/Makefile.linux 2004-02-22 21:36:11.000000000 -0800
+@@ -31,7 +31,7 @@
+
+ # CC = gcc
+ #
+-COPTS = -O2 -pipe -Wall -g
++COPTS = -O2 -pipe -Wall
+ LIBS =
+
+ # Uncomment the next 2 lines to include support for Microsoft's
+@@ -61,13 +61,13 @@
+
+ HAS_SHADOW=y
+ #USE_PAM=y
+-#HAVE_INET6=y
++HAVE_INET6=y
+
+ # Enable plugins
+ PLUGIN=y
+
+ # Enable Microsoft proprietary Callback Control Protocol
+-#CBCP=y
++CBCP=y
+
+ # Enable EAP SRP-SHA1 authentication (requires libsrp)
+ #USE_SRP=y
diff --git a/patches/source/ppp/pppsetup-1.98.backupfiles.diff b/patches/source/ppp/pppsetup-1.98.backupfiles.diff
new file mode 100644
index 000000000..6b3647793
--- /dev/null
+++ b/patches/source/ppp/pppsetup-1.98.backupfiles.diff
@@ -0,0 +1,26 @@
+--- ./pppsetup.orig Sun May 19 19:01:29 2002
++++ ./pppsetup Sun May 19 19:06:07 2002
+@@ -861,10 +861,12 @@
+ echo "multi on" >> /etc/host.conf
+ fi
+
+-if [ ! -z $DOMAINNAME ]; then
++if [ ! -z $DOMAINNAME ]; then
++# backup file
++cp -a /etc/resolv.conf /etc/resolv.conf.$$ 2> /dev/null
+ echo "search $DOMAINNAME" > /etc/resolv.conf
+ else
+-rm -f /etc/resolv.conf 2>/dev/null
++rm -f /etc/resolv.conf 2>/dev/null
+ DOMAINNAME="unknown.com"
+ fi
+
+@@ -875,6 +877,8 @@
+ fi
+
+ if [ ! -s /etc/hosts ]; then
++# backup file
++cp -a /etc/hosts /etc/hosts.bak.$$ 2> /dev/null
+ echo "127.0.0.1 localhost" > /etc/hosts
+ if [ "$DOMAINNAME" = "unknown.com" ]; then
+ echo "0.0.0.0 `hostname 2>/dev/null`.localnet `hostname 2>/dev/null`" >> /etc/hosts
diff --git a/patches/source/ppp/pppsetup-1.98.moredevs.diff b/patches/source/ppp/pppsetup-1.98.moredevs.diff
new file mode 100644
index 000000000..6a11a3b54
--- /dev/null
+++ b/patches/source/ppp/pppsetup-1.98.moredevs.diff
@@ -0,0 +1,105 @@
+--- ./pppsetup.orig Sun May 19 18:41:04 2002
++++ ./pppsetup Sun May 19 18:52:49 2002
+@@ -1,15 +1,10 @@
+ #!/bin/bash
+-###############################################################################
+-#
+ # PPPSETUP -- Script to set up pppd
+ # History:
+ # 7/21/95 RSL Script created (v1.0)
+ # 9/15/96 RSL Added code to get the ISP's domainname (v1.1)
+ # 9/19/96 RSL Revamped interface to use the 'dialog'
+ # program. (v1.2)
+-###############################################################################
+-
+-###############################################################################
+ # 2/22/98 KR Added pap, chap, ms-chap, callback, &
+ # modem init string options. (v1.98)
+ # Creates /etc/ppp/options, & pap, chap,
+@@ -17,33 +12,21 @@
+ # More guidance.
+ # Monitor connection with tail & syslogd.
+ # Demand dialing setup with ppp-2.3.0 or later.
+-###############################################################################
+-
+-###############################################################################
+ # 4/4/98 PJV Fixed massive /tmp-related security problems
+ # Switched to a default init string that's more
+ # likely to work
+ # Increased TIMEOUTs
+ # fixed bad flags given to chat -- caused dialout
+ # to fail
+-###############################################################################
+-
+-###############################################################################
+ # 2/6/1999 PJV Changed all occurances of /dev/cua* to /dev/ttyS*
+-###############################################################################
+-
+-###############################################################################
+ # 5/3/1999 PJV Commented 'debug' in /etc/ppp/options
+ # Add commented 'noauth' in /etc/ppp/options so
+ # people who want to use ppp but already have a
+ # default route have an easier time figuring out
+ # what to do. :)
+-###############################################################################
+-
+-###############################################################################
+ # 6/18/2000 PJV Added code to check for "ppp-stop" and "ppp-on"
+ # symlinks, and make them if they don't exist.
+-###############################################################################
++# 5/19/2002 PJV Added support for more devices.
+
+ TMP=/var/log/setup/tmp
+
+@@ -137,25 +120,40 @@
+ done
+
+ echo "Where is your modem /dev/ttyS?" > $TMP/txtTEMP$$
+-dialog --backtitle "MODEM DEVICE ..." --menu "`cat $TMP/txtTEMP$$`" 11 50 4 \
++dialog --backtitle "MODEM DEVICE ..." --menu "`cat $TMP/txtTEMP$$`" 17 60 10 \
++modem "= use whatever /dev/modem is linked to" \
+ ttyS0 "= (COM1: under DOS)" \
+ ttyS1 "= (COM2: under DOS)" \
+ ttyS2 "= (COM3: under DOS)" \
+ ttyS3 "= (COM4: under DOS)" \
++ttyS4 "= PCI modem" \
++ttyS5 "= PCI modem" \
++ttyS6 "= PCI modem" \
++ttyS7 "= PCI modem" \
++ttyS8 "= PCI modem" \
++ttyS9 "= PCI modem" \
++ttyS10 "= PCI modem" \
++ttyS11 "= PCI modem" \
++ttyS12 "= PCI modem" \
++ttyS13 "= PCI modem" \
++ttyS14 "= PCI modem" \
++ttyS15 "= PCI modem" \
+ 2> $TMP/rspTEMP$$
+
+ MODEM="`cat $TMP/rspTEMP$$`"
+
+-if [ -z $MODEM ]; then
+-clear 2>/dev/null || echo
+-rm -f $TMP/*TEMP*
+-echo "PPP configuration cancelled."
+-exit
+-elif [ ! -c "/dev/$MODEM" ]; then
+-/dev/MAKEDEV $MODEM >/dev/null 2>&1 || MODERROR="YES"
+-else
+-rm -f /dev/modem 2>/dev/null
+-ln -sf /dev/$MODEM /dev/modem 2>/dev/null
++if [ ! "$MODEM" = "modem" ]; then
++ if [ -z $MODEM ]; then
++ clear 2>/dev/null || echo
++ rm -f $TMP/*TEMP*
++ echo "PPP configuration cancelled."
++ exit
++ elif [ ! -c "/dev/$MODEM" ]; then
++ /dev/MAKEDEV $MODEM >/dev/null 2>&1 || MODERROR="YES"
++ else
++ rm -f /dev/modem 2>/dev/null
++ ln -sf /dev/$MODEM /dev/modem 2>/dev/null
++ fi
+ fi
+
+ echo "What baud rate is your modem?" > $TMP/txtTEMP$$
diff --git a/patches/source/ppp/pppsetup-1.98.pppoff.diff b/patches/source/ppp/pppsetup-1.98.pppoff.diff
new file mode 100644
index 000000000..66b51ba7e
--- /dev/null
+++ b/patches/source/ppp/pppsetup-1.98.pppoff.diff
@@ -0,0 +1,19 @@
+--- ppp-off.orig Fri Oct 20 17:43:50 2000
++++ ppp-off Fri Oct 20 17:46:32 2000
+@@ -21,14 +21,8 @@
+ # This just checks if demand dialing is running, if so it
+ # says Demand Dialing Stoped.
+
+-ps x 2>/dev/null > /tmp/grep.tmp
+-
+-if grep 2>/dev/null "options.demand" /tmp/grep.tmp >/dev/null
+-then
+-rm -f /tmp/grep.tmp
+-D="echo Demand Dialing Stoped."
+-else
+-rm -f /tmp/grep.tmp
++if ps x | fgrep "options.demand" 1> /dev/null 2> /dev/null ; then
++ D="echo Demand Dialing Stoped."
+ fi
+
+ #
diff --git a/patches/source/ppp/pppsetup-1.98.slack.diff b/patches/source/ppp/pppsetup-1.98.slack.diff
new file mode 100644
index 000000000..f081699c8
--- /dev/null
+++ b/patches/source/ppp/pppsetup-1.98.slack.diff
@@ -0,0 +1,1709 @@
+--- ./pppsetup.orig Sun Feb 22 12:33:32 1998
++++ ./pppsetup Sun Jun 18 14:01:10 2000
+@@ -19,6 +19,34 @@
+ # Demand dialing setup with ppp-2.3.0 or later.
+ ###############################################################################
+
++###############################################################################
++# 4/4/98 PJV Fixed massive /tmp-related security problems
++# Switched to a default init string that's more
++# likely to work
++# Increased TIMEOUTs
++# fixed bad flags given to chat -- caused dialout
++# to fail
++###############################################################################
++
++###############################################################################
++# 2/6/1999 PJV Changed all occurances of /dev/cua* to /dev/ttyS*
++###############################################################################
++
++###############################################################################
++# 5/3/1999 PJV Commented 'debug' in /etc/ppp/options
++# Add commented 'noauth' in /etc/ppp/options so
++# people who want to use ppp but already have a
++# default route have an easier time figuring out
++# what to do. :)
++###############################################################################
++
++###############################################################################
++# 6/18/2000 PJV Added code to check for "ppp-stop" and "ppp-on"
++# symlinks, and make them if they don't exist.
++###############################################################################
++
++TMP=/var/log/setup/tmp
++
+ if [ ! "$UID" = "0" ]; then
+ echo
+ echo "NOTICE: * $LOGNAME * You need to be 'root' to run this script."
+@@ -43,81 +71,84 @@
+ exit 1
+ fi
+
+-if [ ! -d /tmp ]; then
+-mkdir /tmp
+-chmod 1777 /tmp
+-fi
+-
+ if [ -s /usr/lib/setup/hdsetup ]; then
+-SYS="on SLACKWARE ..."
++SYS="on SLACKWARE."
+ fi
+
+ VERSION="1.98"
+
+ stty erase ^? 2>/dev/null
+
+-echo "PPPSETUP $VERSION $SYS" > /tmp/txtTEMP01
+-echo >> /tmp/txtTEMP01
+-echo "Written by Robert S. Liesenfeld <xunil@bitstream.net> <IRC:Xunil>" >> /tmp/txtTEMP01
+-echo "Changes for 1.98 by Kent Robotti <robotti@erols.com>" >> /tmp/txtTEMP01
+-echo >> /tmp/txtTEMP01
+-echo "You should get these 'DOCS' if you don't already have them." >> /tmp/txtTEMP01
+-echo >> /tmp/txtTEMP01
+-echo 'ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO "PPP-HOWTO"' >> /tmp/txtTEMP01
+-echo 'ftp://sunsite.unc.edu/pub/Linux/docs/faqs/PPP-FAQ "PPP-FAQ"' >> /tmp/txtTEMP01
+-echo >> /tmp/txtTEMP01
+-echo "Press [Enter] to continue with pppsetup..." >> /tmp/txtTEMP01
++if [ ! -r /usr/sbin/ppp-stop ]; then
++ ( cd /usr/sbin ; ln -sf ppp-off ppp-stop )
++fi
++if [ ! -r /usr/sbin/ppp-on ]; then
++ ( cd /usr/sbin ; ln -sf ppp-go ppp-on )
++fi
+
+-dialog --backtitle "PPPSETUP $VERSION ..." --textbox "/tmp/txtTEMP01" 15 70
++echo "PPPSETUP $VERSION $SYS" > $TMP/txtTEMP01
++echo >> $TMP/txtTEMP01
++echo "Written by Robert S. Liesenfeld <xunil@bitstream.net> <IRC:Xunil>" >> $TMP/txtTEMP01
++echo "Changes for 1.98 by Kent Robotti <robotti@erols.com>" >> $TMP/txtTEMP01
++echo "Patched for Slackware by Patrick Volkerding <volkerdi@slackware.com>" >> $TMP/txtTEMP01
++echo >> $TMP/txtTEMP01
++echo "You should get these docs if you don't already have them:" >> $TMP/txtTEMP01
++echo >> $TMP/txtTEMP01
++echo "ftp://metalab.unc.edu/pub/Linux/docs/howto/PPP-HOWTO" >> $TMP/txtTEMP01
++echo "ftp://metalab.unc.edu/pub/Linux/docs/faqs/PPP-FAQ" >> $TMP/txtTEMP01
++echo >> $TMP/txtTEMP01
++echo "Press [Enter] to continue with pppsetup..." >> $TMP/txtTEMP01
++
++dialog --backtitle "PPPSETUP $VERSION/Slackware" --textbox "$TMP/txtTEMP01" 16 73
+
+ while [ -z "$PHONENUM" ]
+ do
+-echo "To begin setting up your PPP connection, i need to know a few things." > /tmp/txtTEMP$$
+-echo "For starters, what is the phone number of your (I)nternet (S)ervice" >> /tmp/txtTEMP$$
+-echo "(P)rovider?" >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo "Example: atdt6661776 <-For (t)one dialing.)" >> /tmp/txtTEMP$$
+-echo "Example: atdp6661776 <-For (p)ulse dialing.)" >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo "Include the: atd? It's usally just: atdtphonenumber" >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo "(Note: in the USA, use atdt*70,6661776 [comma required!] to turn" >> /tmp/txtTEMP$$
+-echo " off call waiting.)" >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
++echo "To begin setting up your PPP connection, i need to know a few things." > $TMP/txtTEMP$$
++echo "For starters, what is the phone number of your (I)nternet (S)ervice" >> $TMP/txtTEMP$$
++echo "(P)rovider?" >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "Example: atdt6661776 <-For (t)one dialing.)" >> $TMP/txtTEMP$$
++echo "Example: atdp6661776 <-For (p)ulse dialing.)" >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "Include the: atd? It's usally just: atdtphonenumber" >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "(Note: in the USA, use atdt*70,6661776 [comma required!] to turn" >> $TMP/txtTEMP$$
++echo " off call waiting.)" >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
+
+-dialog --title "PHONE NUMBER ..." --inputbox "`cat /tmp/txtTEMP$$`" 18 75 2> /tmp/rspTEMP$$
++dialog --title "PHONE NUMBER ..." --inputbox "`cat $TMP/txtTEMP$$`" 18 75 2> $TMP/rspTEMP$$
+
+ if [ $? = 1 ]; then
+-rm -f /tmp/*TEMP*
++rm -f $TMP/*TEMP*
+ clear 2>/dev/null || echo
+ echo "PPP configuration cancelled."
+ exit
+ fi
+
+-PHONENUM="`cat /tmp/rspTEMP$$`"
++PHONENUM="`cat $TMP/rspTEMP$$`"
+
+ if [ -z "$PHONENUM" ]; then
+ clear 2>/dev/null || echo
+-rm -f /tmp/*TEMP*
++rm -f $TMP/*TEMP*
+ echo "PPP configuration cancelled."
+ echo "No phone number."
+ exit
+ fi
+ done
+
+-echo "Where is your modem /dev/cua?" > /tmp/txtTEMP$$
+-dialog --backtitle "MODEM DEVICE ..." --menu "`cat /tmp/txtTEMP$$`" 11 50 4 \
+-cua0 "= (COM1: under DOS)" \
+-cua1 "= (COM2: under DOS)" \
+-cua2 "= (COM3: under DOS)" \
+-cua3 "= (COM4: under DOS)" \
+-2> /tmp/rspTEMP$$
++echo "Where is your modem /dev/ttyS?" > $TMP/txtTEMP$$
++dialog --backtitle "MODEM DEVICE ..." --menu "`cat $TMP/txtTEMP$$`" 11 50 4 \
++ttyS0 "= (COM1: under DOS)" \
++ttyS1 "= (COM2: under DOS)" \
++ttyS2 "= (COM3: under DOS)" \
++ttyS3 "= (COM4: under DOS)" \
++2> $TMP/rspTEMP$$
+
+-MODEM="`cat /tmp/rspTEMP$$`"
++MODEM="`cat $TMP/rspTEMP$$`"
+
+ if [ -z $MODEM ]; then
+ clear 2>/dev/null || echo
+-rm -f /tmp/*TEMP*
++rm -f $TMP/*TEMP*
+ echo "PPP configuration cancelled."
+ exit
+ elif [ ! -c "/dev/$MODEM" ]; then
+@@ -127,139 +158,139 @@
+ ln -sf /dev/$MODEM /dev/modem 2>/dev/null
+ fi
+
+-echo "What baud rate is your modem?" > /tmp/txtTEMP$$
+-dialog --backtitle "MODEM BAUD RATE ..." --menu "`cat /tmp/txtTEMP$$`" 14 72 7 \
++echo "What baud rate is your modem?" > $TMP/txtTEMP$$
++dialog --backtitle "MODEM BAUD RATE ..." --menu "`cat $TMP/txtTEMP$$`" 14 72 7 \
+ 460800 "460KBps - ISDN modem..." \
+ 230400 "230KBps - 56Kbps modem... or ISDN modem..." \
+ 115200 "115KBps - 28.8, 33.6, or 56Kbps modem..." \
+ 57600 "57.6KBps - 28.8, 33.6, or 56Kbps modem..." \
+ 38400 "38.4KBps - Hangin ten on the net! 28.8 or 33.6..." \
+ 19200 "19.2KBps - Better known as 14.4..." \
+-9600 "9600bps - No comment..." 2> /tmp/rspTEMP$$
++9600 "9600bps - No comment..." 2> $TMP/rspTEMP$$
+
+-BAUDRATE="`cat /tmp/rspTEMP$$`"
++BAUDRATE="`cat $TMP/rspTEMP$$`"
+
+ if [ -z $BAUDRATE ]; then
+ clear 2>/dev/null || echo
+-rm -f /tmp/*TEMP*
++rm -f $TMP/*TEMP*
+ echo "PPP configuration cancelled."
+ exit
+ fi
+
+-echo "Does your service provider use CALLBACK?" > /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo "CALLBACK is when you call your service provider and give them" >> /tmp/txtTEMP$$
+-echo "your phone number so they can call you back, then when they" >> /tmp/txtTEMP$$
+-echo "call you back you give them your login name and password." >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo "Most service providers don't use CALLBACK, so the answer is" >> /tmp/txtTEMP$$
+-echo "probably No, unless you know otherwise." >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-
+-dialog --backtitle "CALLBACK YES or NO? ..." --yesno "`cat /tmp/txtTEMP$$`" 13 70
+-
+-if [ $? = 0 ]; then
+-echo "Put your phone number in the box below, so your service provider" > /tmp/txtTEMP$$
+-echo "can call you back." >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo "Example: 7771818" >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
++echo "Does your service provider use CALLBACK?" > $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "CALLBACK is when you call your service provider and give them" >> $TMP/txtTEMP$$
++echo "your phone number so they can call you back, then when they" >> $TMP/txtTEMP$$
++echo "call you back you give them your login name and password." >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "Most service providers don't use CALLBACK, so the answer is" >> $TMP/txtTEMP$$
++echo "probably No, unless you know otherwise." >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++
++dialog --backtitle "CALLBACK YES or NO? ..." --menu "`cat $TMP/txtTEMP$$`" 16 70 2 "NO" "Most Internet providers do not use callback" "YES" "Use callback support (I know what I'm doing)" 2> $TMP/replyTEMP$$
++
++if [ "`cat $TMP/replyTEMP$$`" = "YES" ]; then
++echo "Put your phone number in the box below, so your service provider" > $TMP/txtTEMP$$
++echo "can call you back." >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "Example: 7771818" >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
+
+-dialog --backtitle "CALLBACK Your Phone Number? ..." --inputbox "`cat /tmp/txtTEMP$$`" 11 72 2> /tmp/cb1TEMP$$
++dialog --backtitle "CALLBACK Your Phone Number? ..." --inputbox "`cat $TMP/txtTEMP$$`" 11 72 2> $TMP/cb1TEMP$$
+
+ if [ $? = 1 ]; then
+ clear 2>/dev/null || echo
+-rm -f /tmp/*TEMP*
++rm -f $TMP/*TEMP*
+ echo "PPP configuration cancelled."
+ exit
+-elif [ ! -s /tmp/cb1TEMP$$ ]; then
++elif [ ! -s $TMP/cb1TEMP$$ ]; then
+ clear 2>/dev/null || echo
+-rm -f /tmp/*TEMP*
++rm -f $TMP/*TEMP*
+ echo "PPP configuration cancelled."
+ echo "No Phone Number for Callback."
+ exit
+ fi
+ fi
+
+-if [ -s /tmp/cb1TEMP$$ ]; then
+-CBPN="`cat /tmp/cb1TEMP$$`"
+-echo "I have your phone number: $CBPN" > /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo "Do you have to give a Username or Login for the initial connection" >> /tmp/txtTEMP$$
+-echo "to $PHONENUM before you're called back." >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo "Example: jerry" >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo "If NO, just press [Enter] on a empty box and skip this." >> /tmp/txtTEMP$$
++if [ -s $TMP/cb1TEMP$$ ]; then
++CBPN="`cat $TMP/cb1TEMP$$`"
++echo "I have your phone number: $CBPN" > $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "Do you have to give a Username or Login for the initial connection" >> $TMP/txtTEMP$$
++echo "to $PHONENUM before you're called back." >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "Example: jerry" >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "If NO, just press [Enter] on a empty box and skip this." >> $TMP/txtTEMP$$
+
+-dialog --backtitle "CALLBACK INITIAL LOGIN? ..." --inputbox "`cat /tmp/txtTEMP$$`" 15 74 2> /tmp/cb1.1TEMP$$
++dialog --backtitle "CALLBACK INITIAL LOGIN? ..." --inputbox "`cat $TMP/txtTEMP$$`" 15 74 2> $TMP/cb1.1TEMP$$
+
+ if [ $? = 1 ]; then
+-rm -f /tmp/*TEMP*
++rm -f $TMP/*TEMP*
+ clear 2>/dev/null || echo
+ echo "PPP configuration cancelled."
+ exit
+ else
+-CBMODLOGIN="`cat /tmp/cb1.1TEMP$$`"
++CBMODLOGIN="`cat $TMP/cb1.1TEMP$$`"
+ fi
+ fi
+
+-if [ -s /tmp/cb1TEMP$$ ]; then
+-echo "I have your phone number: $CBPN" > /tmp/txtTEMP$$
+-if [ -s /tmp/cb1.1TEMP$$ ]; then
+-echo "I see you have to give a Username or Login: $CBMODLOGIN" >> /tmp/txtTEMP$$
+-echo "for the initial connection to: $PHONENUM" >> /tmp/txtTEMP$$
+-fi
+-echo >> /tmp/txtTEMP$$
+-echo "Do you have to give a Password for the initial connection" >> /tmp/txtTEMP$$
+-echo "to $PHONENUM before you're called back." >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo "Example: Zoy85mWc" >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo "If NO, just press [Enter] on a empty box and skip this." >> /tmp/txtTEMP$$
++if [ -s $TMP/cb1TEMP$$ ]; then
++echo "I have your phone number: $CBPN" > $TMP/txtTEMP$$
++if [ -s $TMP/cb1.1TEMP$$ ]; then
++echo "I see you have to give a Username or Login: $CBMODLOGIN" >> $TMP/txtTEMP$$
++echo "for the initial connection to: $PHONENUM" >> $TMP/txtTEMP$$
++fi
++echo >> $TMP/txtTEMP$$
++echo "Do you have to give a Password for the initial connection" >> $TMP/txtTEMP$$
++echo "to $PHONENUM before you're called back." >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "Example: Zoy85mWc" >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "If NO, just press [Enter] on a empty box and skip this." >> $TMP/txtTEMP$$
+
+-dialog --backtitle "CALLBACK INITIAL PASSWORD? ..." --inputbox "`cat /tmp/txtTEMP$$`" 17 68 2> /tmp/cb2TEMP$$
++dialog --backtitle "CALLBACK INITIAL PASSWORD? ..." --inputbox "`cat $TMP/txtTEMP$$`" 17 68 2> $TMP/cb2TEMP$$
+
+ if [ $? = 1 ]; then
+-rm -f /tmp/*TEMP*
++rm -f $TMP/*TEMP*
+ clear 2>/dev/null || echo
+ echo "PPP configuration cancelled."
+ exit
+ else
+-CBMODPASS="`cat /tmp/cb2TEMP$$`"
++CBMODPASS="`cat $TMP/cb2TEMP$$`"
+ fi
+ fi
+
+ if [ ! -z "$CBPN" ]; then
+-echo "Are they using PAP or CHAP for AUTHENTICATION? If so answer YES." > /tmp/txtTEMP$$
+-echo "Do they present you with a Username: or Login: and Password: prompt" >> /tmp/txtTEMP$$
+-echo "when they call you back, if so they're probably not using PAP or" >> /tmp/txtTEMP$$
+-echo "CHAP, so you can answer NO here." >> /tmp/txtTEMP$$
+-echo "If you're not sure, you'll have to ask you're service provider." >> /tmp/txtTEMP$$
++echo "Are they using PAP or CHAP for AUTHENTICATION? If so answer YES." > $TMP/txtTEMP$$
++echo "Do they present you with a Username: or Login: and Password: prompt" >> $TMP/txtTEMP$$
++echo "when they call you back, if so they're probably not using PAP or" >> $TMP/txtTEMP$$
++echo "CHAP, so you can answer NO here." >> $TMP/txtTEMP$$
++echo "If you're not sure, you'll have to ask you're service provider." >> $TMP/txtTEMP$$
+
+-dialog --backtitle "CALLBACK PAP-CHAP YES or NO? ..." --yesno "`cat /tmp/txtTEMP$$`" 9 72
++dialog --backtitle "CALLBACK PAP-CHAP YES or NO? ..." --yesno "`cat $TMP/txtTEMP$$`" 9 72
+
+ if [ $? = 1 ]; then
+-echo "What is your Username or Login to your service provider?" > /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo "This is the information you'll give them when they call" >> /tmp/txtTEMP$$
+-echo "you back at: $CBPN" >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo "Example: jerry" >> /tmp/txtTEMP$$
++echo "What is your Username or Login to your service provider?" > $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "This is the information you'll give them when they call" >> $TMP/txtTEMP$$
++echo "you back at: $CBPN" >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "Example: jerry" >> $TMP/txtTEMP$$
+
+-dialog --backtitle "CALLBACK LOGIN? ..." --inputbox "`cat /tmp/txtTEMP$$`" 13 72 2> /tmp/cb3TEMP$$
++dialog --backtitle "CALLBACK LOGIN? ..." --inputbox "`cat $TMP/txtTEMP$$`" 13 72 2> $TMP/cb3TEMP$$
+
+ if [ $? = 1 ]; then
+-rm -f /tmp/*TEMP*
++rm -f $TMP/*TEMP*
+ clear 2>/dev/null || echo
+ echo "PPP configuration cancelled."
+ exit
+ fi
+
+-CBLOGIN="`cat /tmp/cb3TEMP$$`"
++CBLOGIN="`cat $TMP/cb3TEMP$$`"
+
+ if [ -z "$CBLOGIN" ]; then
+-rm -f /tmp/*TEMP*
++rm -f $TMP/*TEMP*
+ clear 2>/dev/null || echo
+ echo "PPP configuration cancelled."
+ echo "No Login for Callback."
+@@ -269,24 +300,24 @@
+ fi
+
+ if [ ! -z "$CBLOGIN" ]; then
+-echo "What is the Password for: $CBLOGIN" > /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo "Example: Ziy79Kie" >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
++echo "What is the Password for: $CBLOGIN" > $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "Example: Ziy79Kie" >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
+
+-dialog --backtitle "CALLBACK PASSWORD? ..." --inputbox "`cat /tmp/txtTEMP$$`" 10 64 2> /tmp/cb4TEMP$$
++dialog --backtitle "CALLBACK PASSWORD? ..." --inputbox "`cat $TMP/txtTEMP$$`" 10 64 2> $TMP/cb4TEMP$$
+
+ if [ $? = 1 ]; then
+-rm -f /tmp/*TEMP*
++rm -f $TMP/*TEMP*
+ clear 2>/dev/null || echo
+ echo "PPP configuration cancelled."
+ exit 1
+ fi
+
+-CBPASS="`cat /tmp/cb4TEMP$$`"
++CBPASS="`cat $TMP/cb4TEMP$$`"
+
+ if [ -z "$CBPASS" ]; then
+-rm -f /tmp/*TEMP*
++rm -f $TMP/*TEMP*
+ clear 2>/dev/null || echo
+ echo "PPP configuration cancelled."
+ echo "No Password for Callback."
+@@ -296,13 +327,13 @@
+
+ callback1() {
+ cat << EOF
+-TIMEOUT 10
++TIMEOUT 60
+ ABORT BUSY
+ ABORT ERROR
+ ABORT VOICE
+ ABORT "NO CARRIER"
+ ABORT "NO DIALTONE"
+-"" "AT\&FW1S0=1H0"
++"" "AT\&FS0=1H0"
+ OK "ATDT$PHONENUM"
+ TIMEOUT 60
+ CONNECT ""
+@@ -322,13 +353,13 @@
+
+ callback2() {
+ cat << EOF
+-TIMEOUT 10
++TIMEOUT 60
+ ABORT BUSY
+ ABORT ERROR
+ ABORT VOICE
+ ABORT "NO CARRIER"
+ ABORT "NO DIALTONE"
+-"" "AT\&FW1S0=1H0"
++"" "AT\&FS0=1H0"
+ OK "ATDT$PHONENUM"
+ TIMEOUT 60
+ CONNECT ""
+@@ -344,13 +375,13 @@
+
+ callback3() {
+ cat << EOF
+-TIMEOUT 10
++TIMEOUT 60
+ ABORT BUSY
+ ABORT ERROR
+ ABORT VOICE
+ ABORT "NO CARRIER"
+ ABORT "NO DIALTONE"
+-"" "AT\&FW1S0=1H0"
++"" "AT\&FS0=1H0"
+ OK "ATDT$PHONENUM"
+ TIMEOUT 60
+ CONNECT ""
+@@ -368,13 +399,13 @@
+
+ callback4() {
+ cat << EOF
+-TIMEOUT 10
++TIMEOUT 60
+ ABORT BUSY
+ ABORT ERROR
+ ABORT VOICE
+ ABORT "NO CARRIER"
+ ABORT "NO DIALTONE"
+-"" "AT\&FW1S0=1H0"
++"" "AT\&FS0=1H0"
+ OK "ATDT$PHONENUM"
+ TIMEOUT 60
+ CONNECT ""
+@@ -393,13 +424,13 @@
+
+ callback5() {
+ cat << EOF
+-TIMEOUT 10
++TIMEOUT 60
+ ABORT BUSY
+ ABORT ERROR
+ ABORT VOICE
+ ABORT "NO CARRIER"
+ ABORT "NO DIALTONE"
+-"" "AT\&FW1S0=1H0"
++"" "AT\&FS0=1H0"
+ OK "ATDT$PHONENUM"
+ TIMEOUT 60
+ CONNECT ""
+@@ -417,13 +448,13 @@
+
+ callback6() {
+ cat << EOF
+-TIMEOUT 10
++TIMEOUT 60
+ ABORT BUSY
+ ABORT ERROR
+ ABORT VOICE
+ ABORT "NO CARRIER"
+ ABORT "NO DIALTONE"
+-"" "AT\&FW1S0=1H0"
++"" "AT\&FS0=1H0"
+ OK "ATDT$PHONENUM"
+ TIMEOUT 60
+ CONNECT ""
+@@ -440,13 +471,13 @@
+
+ callback7() {
+ cat << EOF
+-TIMEOUT 10
++TIMEOUT 60
+ ABORT BUSY
+ ABORT ERROR
+ ABORT VOICE
+ ABORT "NO CARRIER"
+ ABORT "NO DIALTONE"
+-"" "AT\&FW1S0=1H0"
++"" "AT\&FS0=1H0"
+ OK "ATDT$PHONENUM"
+ TIMEOUT 60
+ CONNECT ""
+@@ -465,20 +496,20 @@
+ mkdir -p /etc/ppp
+ fi
+
+-if [ -s /tmp/cb1TEMP$$ ]; then
+-if [ -s /tmp/cb1.1TEMP$$ ] && [ -s /tmp/cb2TEMP$$ ] && [ -s /tmp/cb3TEMP$$ ] && [ -s /tmp/cb4TEMP$$ ]; then
++if [ -s $TMP/cb1TEMP$$ ]; then
++if [ -s $TMP/cb1.1TEMP$$ ] && [ -s $TMP/cb2TEMP$$ ] && [ -s $TMP/cb3TEMP$$ ] && [ -s $TMP/cb4TEMP$$ ]; then
+ callback1 > /etc/ppp/callback
+-elif [ ! -s /tmp/cb1.1TEMP$$ ] && [ ! -s /tmp/cb2TEMP$$ ] && [ ! -s /tmp/cb3TEMP$$ ] && [ ! -s /tmp/cb4TEMP$$ ]; then
++elif [ ! -s $TMP/cb1.1TEMP$$ ] && [ ! -s $TMP/cb2TEMP$$ ] && [ ! -s $TMP/cb3TEMP$$ ] && [ ! -s $TMP/cb4TEMP$$ ]; then
+ callback2 > /etc/ppp/callback
+-elif [ ! -s /tmp/cb1.1TEMP$$ ] && [ ! -s /tmp/cb2TEMP$$ ] && [ -s /tmp/cb3TEMP$$ ] && [ -s /tmp/cb4TEMP$$ ]; then
++elif [ ! -s $TMP/cb1.1TEMP$$ ] && [ ! -s $TMP/cb2TEMP$$ ] && [ -s $TMP/cb3TEMP$$ ] && [ -s $TMP/cb4TEMP$$ ]; then
+ callback3 > /etc/ppp/callback
+-elif [ ! -s /tmp/cb1.1TEMP$$ ] && [ -s /tmp/cb2TEMP$$ ] && [ -s /tmp/cb3TEMP$$ ] && [ -s /tmp/cb4TEMP$$ ]; then
++elif [ ! -s $TMP/cb1.1TEMP$$ ] && [ -s $TMP/cb2TEMP$$ ] && [ -s $TMP/cb3TEMP$$ ] && [ -s $TMP/cb4TEMP$$ ]; then
+ callback4 > /etc/ppp/callback
+-elif [ -s /tmp/cb1.1TEMP$$ ] && [ -s /tmp/cb2TEMP$$ ] && [ ! -s /tmp/cb3TEMP$$ ] && [ ! -s /tmp/cb4TEMP$$ ]; then
++elif [ -s $TMP/cb1.1TEMP$$ ] && [ -s $TMP/cb2TEMP$$ ] && [ ! -s $TMP/cb3TEMP$$ ] && [ ! -s $TMP/cb4TEMP$$ ]; then
+ callback5 > /etc/ppp/callback
+-elif [ -s /tmp/cb1.1TEMP$$ ] && [ ! -s /tmp/cb3TEMP$$ ] && [ ! -s /tmp/cb4TEMP$$ ]; then
++elif [ -s $TMP/cb1.1TEMP$$ ] && [ ! -s $TMP/cb3TEMP$$ ] && [ ! -s $TMP/cb4TEMP$$ ]; then
+ callback6 > /etc/ppp/callback
+-elif [ -s /tmp/cb2TEMP$$ ] && [ ! -s /tmp/cb3TEMP$$ ] && [ ! -s /tmp/cb4TEMP$$ ]; then
++elif [ -s $TMP/cb2TEMP$$ ] && [ ! -s $TMP/cb3TEMP$$ ] && [ ! -s $TMP/cb4TEMP$$ ]; then
+ callback7 > /etc/ppp/callback
+ fi
+ fi
+@@ -488,93 +519,93 @@
+ chmod 600 /etc/ppp/callback 2>/dev/null
+ fi
+
+-if [ ! -s /tmp/cb1TEMP$$ ]; then
+-echo 'The default modem init string will be: "AT\&FW1H0" OK' > /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo "If you want to change it, put your init string in the box below." >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo "If you use \ in the init string, put it twice." >> /tmp/txtTEMP$$
+-echo 'Example: "AT\&F\\K3\\N3W1H0" OK' >> /tmp/txtTEMP$$
+-echo "M = No sound. W1 or S95=46 = Show CARRIER speed: 28800 etc." >> /tmp/txtTEMP$$
+-echo 'Put "" around each init string with "&" in it.' >> /tmp/txtTEMP$$
+-echo 'Put OK after each init string. Example: ATZ OK "AT\&F1MW1H0" OK' >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo "Just press [Enter] on a empty box to accept the default above." >> /tmp/txtTEMP$$
++if [ ! -s $TMP/cb1TEMP$$ ]; then
++echo 'The default modem init string will be: "AT&FH0" OK' > $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "If you want to change it, put your init string in the box below." >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "If you use \ in the init string, put it twice." >> $TMP/txtTEMP$$
++echo 'Example: "AT\&F\\K3\\N3H0" OK' >> $TMP/txtTEMP$$
++echo "M = No sound. S95=46 = Show CARRIER speed: 28800 etc." >> $TMP/txtTEMP$$
++echo 'Put "" around each init string with "&" in it.' >> $TMP/txtTEMP$$
++echo 'Put OK after each init string. Example: ATZ OK "AT\&F1MH0" OK' >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "Just press [Enter] on a empty box to accept the default above." >> $TMP/txtTEMP$$
+
+-dialog --backtitle "MODEM INIT STRING ..." --inputbox "`cat /tmp/txtTEMP$$`" 18 74 2> /tmp/rspTEMP$$
++dialog --backtitle "MODEM INIT STRING ..." --inputbox "`cat $TMP/txtTEMP$$`" 18 74 2> $TMP/rspTEMP$$
+
+ if [ $? = 1 ]; then
+-rm -f /tmp/*TEMP*
++rm -f $TMP/*TEMP*
+ clear 2>/dev/null || echo
+ echo "PPP configuration cancelled."
+ exit
+ fi
+
+-if [ -s /tmp/rspTEMP$$ ]; then
+-INIT="`cat /tmp/rspTEMP$$`"
++if [ -s $TMP/rspTEMP$$ ]; then
++INIT="`cat $TMP/rspTEMP$$`"
+ else
+ INIT="below"
+ fi
+ fi
+
+-echo "What is your (I)nternet (S)ervice (P)rovider's domain name?" > /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo "This is usually something like..." >> /tmp/txtTEMP$$
+-echo "Examples: something.edu something.net something.com something.org" >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
++echo "What is your (I)nternet (S)ervice (P)rovider's domain name?" > $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "This is usually something like..." >> $TMP/txtTEMP$$
++echo "Examples: something.edu something.net something.com something.org" >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
+
+-dialog --backtitle "DOMAIN NAME ..." --inputbox "`cat /tmp/txtTEMP$$`" 11 74 2> /tmp/rspTEMP$$
++dialog --backtitle "DOMAIN NAME ..." --inputbox "`cat $TMP/txtTEMP$$`" 11 74 2> $TMP/rspTEMP$$
+
+ if [ $? = 1 ]; then
+-rm -f /tmp/*TEMP*
++rm -f $TMP/*TEMP*
+ clear 2>/dev/null || echo
+ echo "PPP configuration cancelled."
+ exit
+ fi
+
+-DOMAINNAME="`cat /tmp/rspTEMP$$`"
++DOMAINNAME="`cat $TMP/rspTEMP$$`"
+
+-echo "What is the IP address of your Internet provider's nameserver?" > /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo "It's important that these IP numbers be correct." >> /tmp/txtTEMP$$
+-echo "The IP numbers should not be: 0.0.0.0" >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo "Note: Your service provider's technical support can provide you" >> /tmp/txtTEMP$$
+-echo "with this information. Example: 207.132.116.5" >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
++echo "What is the IP address of your Internet provider's nameserver?" > $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "It's important that these IP numbers be correct." >> $TMP/txtTEMP$$
++echo "The IP numbers should not be: 0.0.0.0" >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "Note: Your service provider's technical support can provide you" >> $TMP/txtTEMP$$
++echo "with this information. Example: 207.132.116.5" >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
+
+-dialog --backtitle "DNS IP ADDRESS ..." --inputbox "`cat /tmp/txtTEMP$$`" 14 74 2> /tmp/rspTEMP$$
++dialog --backtitle "DNS IP ADDRESS ..." --inputbox "`cat $TMP/txtTEMP$$`" 14 74 2> $TMP/rspTEMP$$
+
+ if [ $? = 1 ]; then
+-rm -f /tmp/*TEMP*
++rm -f $TMP/*TEMP*
+ clear 2>/dev/null || echo
+ echo "PPP configuration cancelled."
+ exit
+ fi
+
+-DNSIP="`cat /tmp/rspTEMP$$`"
++DNSIP="`cat $TMP/rspTEMP$$`"
+
+-if [ ! -s /tmp/cb3TEMP$$ ]; then
+-echo "Does your service provider use PAP or CHAP?" > /tmp/txtTEMP$$
+-echo "If you're presented with a Username: or Login: and Password:" >> /tmp/txtTEMP$$
+-echo "prompt when you connect to your service provider, they're" >> /tmp/txtTEMP$$
+-echo "'probably' not using PAP or CHAP, so you can answer SCRIPT." >> /tmp/txtTEMP$$
+-echo "I said 'probably', the only way to know for sure is to ask you're" >> /tmp/txtTEMP$$
+-echo "service provider, this could save you a lot of wasted time." >> /tmp/txtTEMP$$
++if [ ! -s $TMP/cb3TEMP$$ ]; then
++echo "Does your service provider use PAP or CHAP?" > $TMP/txtTEMP$$
++echo "If you're presented with a Username: or Login: and Password:" >> $TMP/txtTEMP$$
++echo "prompt when you connect to your service provider, they're" >> $TMP/txtTEMP$$
++echo "'probably' not using PAP or CHAP, so you can answer SCRIPT." >> $TMP/txtTEMP$$
++echo "I said 'probably', the only way to know for sure is to ask you're" >> $TMP/txtTEMP$$
++echo "service provider, this could save you a lot of wasted time." >> $TMP/txtTEMP$$
+
+-dialog --backtitle "PAP, CHAP, or SCRIPT? ..." --menu "`cat /tmp/txtTEMP$$`" 16 72 4 \
++dialog --backtitle "PAP, CHAP, or SCRIPT? ..." --menu "`cat $TMP/txtTEMP$$`" 16 72 4 \
+ PAP "AUTHENTICATION" \
+ CHAP "AUTHENTICATION" \
+ MS-CHAP-80 "is microsoft's version of CHAP." \
+-SCRIPT "Create Chat Script For Login." 2> /tmp/papTEMP
++SCRIPT "Create Chat Script For Login." 2> $TMP/papTEMP
+
+ if [ $? = 1 ]; then
+-rm -f /tmp/*TEMP*
++rm -f $TMP/*TEMP*
+ clear 2>/dev/null || echo
+ echo "PPP configuration cancelled."
+ exit
+ else
+-PAP="`cat /tmp/papTEMP`"
++PAP="`cat $TMP/papTEMP`"
+ fi
+ fi
+
+@@ -595,46 +626,46 @@
+
+ if [ "$PAP" = "MS-CHAP-80" ]; then
+ if [ ! -z "$DOMAINNAME" ]; then
+-echo > /tmp/txtTEMP$$
+-echo "You gave $DOMAINNAME for domain name, this will be the" >> /tmp/txtTEMP$$
+-echo "NT server you connect to when you dial: $PHONENUM" >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
++echo > $TMP/txtTEMP$$
++echo "You gave $DOMAINNAME for domain name, this will be the" >> $TMP/txtTEMP$$
++echo "NT server you connect to when you dial: $PHONENUM" >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
+ else
+-echo > /tmp/txtTEMP$$
++echo > $TMP/txtTEMP$$
+ fi
+-RAS >> /tmp/txtTEMP$$
++RAS >> $TMP/txtTEMP$$
+
+-dialog --title "MS-CHAP NT server, Stand-alone or ? ..." --menu "`cat /tmp/txtTEMP$$`" 22 72 2 \
++dialog --title "MS-CHAP NT server, Stand-alone or ? ..." --menu "`cat $TMP/txtTEMP$$`" 22 72 2 \
+ MS-CHAP-SERVER-1 "Stand-alone..." \
+-MS-CHAP-SERVER-2 "Queries domain controller..." 2> /tmp/mschapTEMP
++MS-CHAP-SERVER-2 "Queries domain controller..." 2> $TMP/mschapTEMP
+
+ if [ $? = 1 ]; then
+-rm -f /tmp/*TEMP*
++rm -f $TMP/*TEMP*
+ clear 2>/dev/null || echo
+ echo "PPP configuration cancelled."
+ exit
+ fi
+
+-MSCHAP="`cat /tmp/mschapTEMP`"
++MSCHAP="`cat $TMP/mschapTEMP`"
+
+ if [ "$MSCHAP" = "MS-CHAP-SERVER-2" ]; then
+-echo "Put the name of the domain you have your account on." > /tmp/txtTEMP0
+-echo "Example: fooboo" >> /tmp/txtTEMP0
+-echo >> /tmp/txtTEMP0
++echo "Put the name of the domain you have your account on." > $TMP/txtTEMP0
++echo "Example: fooboo" >> $TMP/txtTEMP0
++echo >> $TMP/txtTEMP0
+
+-dialog --backtitle "MS-CHAP QUERY DOMAIN? ..." --inputbox "`cat /tmp/txtTEMP0`" 9 64 2> /tmp/rspTEMP0
++dialog --backtitle "MS-CHAP QUERY DOMAIN? ..." --inputbox "`cat $TMP/txtTEMP0`" 9 64 2> $TMP/rspTEMP0
+
+ if [ $? = 1 ]; then
+-rm -f /tmp/*TEMP*
++rm -f $TMP/*TEMP*
+ clear 2>/dev/null || echo
+ echo "PPP configuration cancelled."
+ exit
+ fi
+
+-MSDOMAIN="`cat /tmp/rspTEMP0`"
++MSDOMAIN="`cat $TMP/rspTEMP0`"
+
+-if [ ! -s /tmp/rspTEMP0 ]; then
+-rm -f /tmp/*TEMP*
++if [ ! -s $TMP/rspTEMP0 ]; then
++rm -f $TMP/*TEMP*
+ clear 2>/dev/null || echo
+ echo "PPP configuration cancelled."
+ echo "No ms-chap query domain name given."
+@@ -643,32 +674,32 @@
+ fi
+ fi
+
+-if [ ! "$PAP" = "SCRIPT" ] && [ ! -s /tmp/cb3TEMP$$ ]; then
+-echo "Put your Login = Username in the box below." > /tmp/txtTEMP1
+-echo >> /tmp/txtTEMP1
+-echo "Sometimes they want your username or number followed" >> /tmp/txtTEMP1
+-echo "by their @domain name like this below." >> /tmp/txtTEMP1
+-echo "Example: jerry@foo.boo.com" >> /tmp/txtTEMP1
+-echo "Example: 1234567@foo.boo.com" >> /tmp/txtTEMP1
+-echo >> /tmp/txtTEMP1
+-echo "Sometimes the username is two words." >> /tmp/txtTEMP1
+-echo "Example: jerry donut" >> /tmp/txtTEMP1
+-echo >> /tmp/txtTEMP1
+-echo "Usally it's just your username like this below." >> /tmp/txtTEMP1
+-echo "Example: jerry" >> /tmp/txtTEMP1
+-echo >> /tmp/txtTEMP1
++if [ ! "$PAP" = "SCRIPT" ] && [ ! -s $TMP/cb3TEMP$$ ]; then
++echo "Put your Login = Username in the box below." > $TMP/txtTEMP1
++echo >> $TMP/txtTEMP1
++echo "Sometimes they want your username or number followed" >> $TMP/txtTEMP1
++echo "by their @domain name like this below." >> $TMP/txtTEMP1
++echo "Example: jerry@foo.boo.com" >> $TMP/txtTEMP1
++echo "Example: 1234567@foo.boo.com" >> $TMP/txtTEMP1
++echo >> $TMP/txtTEMP1
++echo "Sometimes the username is two words." >> $TMP/txtTEMP1
++echo "Example: jerry donut" >> $TMP/txtTEMP1
++echo >> $TMP/txtTEMP1
++echo "Usally it's just your username like this below." >> $TMP/txtTEMP1
++echo "Example: jerry" >> $TMP/txtTEMP1
++echo >> $TMP/txtTEMP1
+
+-dialog --backtitle "PAP or CHAP LOGIN? ..." --inputbox "`cat /tmp/txtTEMP1`" 19 64 2> /tmp/rspTEMP1
++dialog --backtitle "PAP or CHAP LOGIN? ..." --inputbox "`cat $TMP/txtTEMP1`" 19 64 2> $TMP/rspTEMP1
+
+ if [ $? = 1 ]; then
+-rm -f /tmp/*TEMP*
++rm -f $TMP/*TEMP*
+ clear 2>/dev/null || echo
+ echo "PPP configuration cancelled."
+ exit
+ fi
+
+-if [ ! -s /tmp/rspTEMP1 ]; then
+-rm -f /tmp/*TEMP*
++if [ ! -s $TMP/rspTEMP1 ]; then
++rm -f $TMP/*TEMP*
+ clear 2>/dev/null || echo
+ echo "PPP configuration cancelled."
+ echo "No username for pap, chap, or ms-chap given."
+@@ -676,119 +707,119 @@
+ fi
+ fi
+
+-if [ -s /tmp/rspTEMP1 ]; then
+-AUTH1="`cat /tmp/rspTEMP1`"
+-echo "$AUTH1" > /tmp/txtTEMP2
+-echo "What's the password for the username above?" >> /tmp/txtTEMP2
+-echo "Example: Xpi9u87T" >> /tmp/txtTEMP2
+-dialog --backtitle "PAP or CHAP PASSWORD? ..." --inputbox "`cat /tmp/txtTEMP2`" 10 64 2> /tmp/rspTEMP2
++if [ -s $TMP/rspTEMP1 ]; then
++AUTH1="`cat $TMP/rspTEMP1`"
++echo "$AUTH1" > $TMP/txtTEMP2
++echo "What's the password for the username above?" >> $TMP/txtTEMP2
++echo "Example: Xpi9u87T" >> $TMP/txtTEMP2
++dialog --backtitle "PAP or CHAP PASSWORD? ..." --inputbox "`cat $TMP/txtTEMP2`" 10 64 2> $TMP/rspTEMP2
+
+-AUTH2="`cat /tmp/rspTEMP2`"
++AUTH2="`cat $TMP/rspTEMP2`"
+ END=""
+
+-elif [ ! -s /tmp/cb1TEMP$$ ] && [ "$PAP" = "SCRIPT" ]; then
++elif [ ! -s $TMP/cb1TEMP$$ ] && [ "$PAP" = "SCRIPT" ]; then
+ END='""'
+-echo "If you reached this part of the script, it should be because you" > /tmp/txtTEMP$$
+-echo "skipped the PAP or CHAP? and CALLBACK? parts of this script." >> /tmp/txtTEMP$$
+-echo "In other words, your service provider is not using PAP, CHAP, or" >> /tmp/txtTEMP$$
+-echo "CALLBACK." >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo "Now comes the tough part. :) I need to know what your" >> /tmp/txtTEMP$$
+-echo "service provider prints to your screen when you dial in," >> /tmp/txtTEMP$$
+-echo "and what you respond with." >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo "Usally when you connect to your service provider you see a" >> /tmp/txtTEMP$$
+-echo "Username: or Login: prompt, and you respond with your name." >> /tmp/txtTEMP$$
+-echo "Then there's a Password: prompt and you respond with your" >> /tmp/txtTEMP$$
+-echo "password." >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo "If you're not sure if it's Login: or login:, just put ogin:" >> /tmp/txtTEMP$$
+-echo "you don't have to spell the whole thing out, the end part of" >> /tmp/txtTEMP$$
+-echo "what to wait for should be enough." >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo 'If they put this for example "foobar fooboo ID:", you could just' >> /tmp/txtTEMP$$
+-echo 'put ID: or you could spell the whole thing out & put "" around it.' >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo "What text should I wait for?" >> /tmp/txtTEMP$$
+-echo "ID:" >> /tmp/txtTEMP$$
+-echo "What text should I send?" >> /tmp/txtTEMP$$
+-echo "jerry" >> /tmp/txtTEMP$$
+-echo "What text should I wait for?" >> /tmp/txtTEMP$$
+-echo '"foobar fooboo ID:"' >> /tmp/txtTEMP$$
+-echo "What text should I send?" >> /tmp/txtTEMP$$
+-echo "jerry" >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo "Sometimes you may want to wait for nothing, but send something." >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo "What text should I wait for?" >> /tmp/txtTEMP$$
+-echo '""' >> /tmp/txtTEMP$$
+-echo "What text should I send?" >> /tmp/txtTEMP$$
+-echo "something" >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo '"" = wait for nothing.' >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo "If you don't want your password printed out put \q in front of it." >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo "What text should I wait for?" >> /tmp/txtTEMP$$
+-echo "Password:" >> /tmp/txtTEMP$$
+-echo "What text should I send?" >> /tmp/txtTEMP$$
+-echo "\qsecret" >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo "ogin: = Login: name: = Username: word: = Password:" >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo "This below would end up looking like this in the /etc/ppp/pppscript" >> /tmp/txtTEMP$$
+-echo "file created by pppsetup when you're done." >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo "ogin: jerry" >> /tmp/txtTEMP$$
+-echo "word: secret" >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo "For example..." >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo "What text should I wait for?" >> /tmp/txtTEMP$$
+-echo "ogin:" >> /tmp/txtTEMP$$
+-echo "And what text should I send?" >> /tmp/txtTEMP$$
+-echo "jerry" >> /tmp/txtTEMP$$
+-echo "What text should I wait for?" >> /tmp/txtTEMP$$
+-echo "word:" >> /tmp/txtTEMP$$
+-echo "And what text should I send?" >> /tmp/txtTEMP$$
+-echo "secret" >> /tmp/txtTEMP$$
+-echo "What text should I wait for?" >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo "( End by pressing Enter on an empty = blank wait for? box. )" >> /tmp/txtTEMP$$
++echo "If you reached this part of the script, it should be because you" > $TMP/txtTEMP$$
++echo "skipped the PAP or CHAP? and CALLBACK? parts of this script." >> $TMP/txtTEMP$$
++echo "In other words, your service provider is not using PAP, CHAP, or" >> $TMP/txtTEMP$$
++echo "CALLBACK." >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "Now comes the tough part. :) I need to know what your" >> $TMP/txtTEMP$$
++echo "service provider prints to your screen when you dial in," >> $TMP/txtTEMP$$
++echo "and what you respond with." >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "Usally when you connect to your service provider you see a" >> $TMP/txtTEMP$$
++echo "Username: or Login: prompt, and you respond with your name." >> $TMP/txtTEMP$$
++echo "Then there's a Password: prompt and you respond with your" >> $TMP/txtTEMP$$
++echo "password." >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "If you're not sure if it's Login: or login:, just put ogin:" >> $TMP/txtTEMP$$
++echo "you don't have to spell the whole thing out, the end part of" >> $TMP/txtTEMP$$
++echo "what to wait for should be enough." >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo 'If they put this for example "foobar fooboo ID:", you could just' >> $TMP/txtTEMP$$
++echo 'put ID: or you could spell the whole thing out & put "" around it.' >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "What text should I wait for?" >> $TMP/txtTEMP$$
++echo "ID:" >> $TMP/txtTEMP$$
++echo "What text should I send?" >> $TMP/txtTEMP$$
++echo "jerry" >> $TMP/txtTEMP$$
++echo "What text should I wait for?" >> $TMP/txtTEMP$$
++echo '"foobar fooboo ID:"' >> $TMP/txtTEMP$$
++echo "What text should I send?" >> $TMP/txtTEMP$$
++echo "jerry" >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "Sometimes you may want to wait for nothing, but send something." >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "What text should I wait for?" >> $TMP/txtTEMP$$
++echo '""' >> $TMP/txtTEMP$$
++echo "What text should I send?" >> $TMP/txtTEMP$$
++echo "something" >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo '"" = wait for nothing.' >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "If you don't want your password printed out put \q in front of it." >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "What text should I wait for?" >> $TMP/txtTEMP$$
++echo "Password:" >> $TMP/txtTEMP$$
++echo "What text should I send?" >> $TMP/txtTEMP$$
++echo "\qsecret" >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "ogin: = Login: name: = Username: word: = Password:" >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "This below would end up looking like this in the /etc/ppp/pppscript" >> $TMP/txtTEMP$$
++echo "file created by pppsetup when you're done." >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "ogin: jerry" >> $TMP/txtTEMP$$
++echo "word: secret" >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "For example..." >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "What text should I wait for?" >> $TMP/txtTEMP$$
++echo "ogin:" >> $TMP/txtTEMP$$
++echo "And what text should I send?" >> $TMP/txtTEMP$$
++echo "jerry" >> $TMP/txtTEMP$$
++echo "What text should I wait for?" >> $TMP/txtTEMP$$
++echo "word:" >> $TMP/txtTEMP$$
++echo "And what text should I send?" >> $TMP/txtTEMP$$
++echo "secret" >> $TMP/txtTEMP$$
++echo "What text should I wait for?" >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "( End by pressing Enter on an empty = blank wait for? box. )" >> $TMP/txtTEMP$$
+
+-dialog --title "CHAT SCRIPT" --textbox "/tmp/txtTEMP$$" 22 72
++dialog --title "CHAT SCRIPT" --textbox "$TMP/txtTEMP$$" 22 72
+
+ MESSAGE=' '
+ YOUSAY=' '
+ while [ ! "$MESSAGE" = "" -a ! "$YOUSAY" = "" ]
+ do
+
+-echo " End by pressing Enter on a empty = blank box." > /tmp/txtTEMP$$
+-echo " What text should I wait for?" >> /tmp/txtTEMP$$
+-dialog --backtitle "EXPECT ..." --inputbox "`cat /tmp/txtTEMP$$`" 9 60 2> /tmp/rspTEMP$$
++echo " End by pressing Enter on a empty = blank box." > $TMP/txtTEMP$$
++echo " What text should I wait for?" >> $TMP/txtTEMP$$
++dialog --backtitle "EXPECT ..." --inputbox "`cat $TMP/txtTEMP$$`" 9 60 2> $TMP/rspTEMP$$
+
+-MESSAGE="`cat /tmp/rspTEMP$$`"
++MESSAGE="`cat $TMP/rspTEMP$$`"
+
+ if [ -z "$MESSAGE" ]; then
+ continue
+ fi
+
+-dialog --backtitle "SEND ..." --inputbox "And what text should I send?" 8 60 2> /tmp/rspTEMP$$
++dialog --backtitle "SEND ..." --inputbox "And what text should I send?" 8 60 2> $TMP/rspTEMP$$
+
+ if [ $? = 1 ]; then
+-rm -f /tmp/*TEMP*
++rm -f $TMP/*TEMP*
+ clear 2>/dev/null || echo
+ echo "PPP configuration cancelled."
+ exit
+ fi
+
+-YOUSAY="`cat /tmp/rspTEMP$$`"
++YOUSAY="`cat $TMP/rspTEMP$$`"
+
+-echo "$MESSAGE $YOUSAY" >> /tmp/sayTEMP1
++echo "$MESSAGE $YOUSAY" >> $TMP/sayTEMP1
+
+ if [ -z "$YOUSAY" ]; then
+ clear 2>/dev/null || echo
+-rm -f /tmp/*TEMP*
++rm -f $TMP/*TEMP*
+ echo "PPP configuration cancelled."
+ echo "Nothing to send."
+ exit
+@@ -798,22 +829,22 @@
+ done
+ fi
+
+-if [ ! -s /tmp/cb3TEMP$$ ]; then
+-if [ -s /tmp/cb1TEMP$$ ] && [ ! -s /tmp/cb3TEMP$$ ] && [ "$PAP" = "SCRIPT" ]; then
++if [ ! -s $TMP/cb3TEMP$$ ]; then
++if [ -s $TMP/cb1TEMP$$ ] && [ ! -s $TMP/cb3TEMP$$ ] && [ "$PAP" = "SCRIPT" ]; then
+ clear 2>/dev/null || echo
+-rm -f /tmp/*TEMP*
++rm -f $TMP/*TEMP*
+ echo "PPP configuration cancelled."
+ echo "You chose callback with PAP or CHAP, but answered SCRIPT to PAP or CHAP?."
+ exit
+-elif [ ! -s /tmp/rspTEMP2 ] && [ -s /tmp/rspTEMP1 ]; then
++elif [ ! -s $TMP/rspTEMP2 ] && [ -s $TMP/rspTEMP1 ]; then
+ clear 2>/dev/null || echo
+-rm -f /tmp/*TEMP*
++rm -f $TMP/*TEMP*
+ echo "PPP configuration cancelled."
+ echo "No password for: $AUTH1"
+ exit
+-elif [ ! -s /tmp/sayTEMP1 ] && [ ! -s /tmp/rspTEMP2 ]; then
++elif [ ! -s $TMP/sayTEMP1 ] && [ ! -s $TMP/rspTEMP2 ]; then
+ clear 2>/dev/null || echo
+-rm -f /tmp/*TEMP*
++rm -f $TMP/*TEMP*
+ echo "PPP configuration cancelled."
+ echo "Nothing to wait for."
+ exit
+@@ -868,9 +899,9 @@
+ PATH1="pppd"
+ fi
+
+-if [ "$PATH1" != "pppd" ]; then
+-chmod 4755 $PATH1 2>/dev/null
+-fi
++#if [ "$PATH1" != "pppd" ]; then
++#chmod 4755 $PATH1 2>/dev/null
++#fi
+
+ if [ -x /usr/sbin/chat ]; then
+ PATH2="/usr/sbin/chat"
+@@ -886,14 +917,14 @@
+ PATH2="chat"
+ fi
+
+-if [ ! -s /tmp/cb1TEMP$$ ]; then
+-echo "TIMEOUT 10" > /etc/ppp/pppscript
++if [ ! -s $TMP/cb1TEMP$$ ]; then
++echo "TIMEOUT 60" > /etc/ppp/pppscript
+ echo "ABORT ERROR" >> /etc/ppp/pppscript
+ echo "ABORT BUSY" >> /etc/ppp/pppscript
+ echo 'ABORT "NO CARRIER"' >> /etc/ppp/pppscript
+ echo 'ABORT "NO DIALTONE"' >> /etc/ppp/pppscript
+ if [ "$INIT" = "below" ]; then
+-echo '"" "AT\&FW1H0"' >> /etc/ppp/pppscript
++echo '"" "AT&FH0"' >> /etc/ppp/pppscript
+ echo 'OK "'$PHONENUM'"' >> /etc/ppp/pppscript
+ else
+ echo '"" '$INIT'' >> /etc/ppp/pppscript
+@@ -905,8 +936,8 @@
+ chmod 600 /etc/ppp/pppscript 2>/dev/null
+ fi
+
+-if [ -s /tmp/sayTEMP1 ]; then
+-cat /tmp/sayTEMP1 >> /etc/ppp/pppscript
++if [ -s $TMP/sayTEMP1 ]; then
++cat $TMP/sayTEMP1 >> /etc/ppp/pppscript
+ echo >> /etc/ppp/pppscript
+ else
+ echo >> /etc/ppp/pppscript
+@@ -948,9 +979,9 @@
+ echo "# The CARRIER speed at which you connected will be reported, if it's in" >> /etc/ppp/ip-up
+ echo '# the /var/log/messages file. You also need the programs "tail" "cut"' >> /etc/ppp/ip-up
+ echo '# "tr" "grep" and "syslogd" running for this to work.' >> /etc/ppp/ip-up
+-echo "# You may have to add W1 or S95=46 to your modem init string" >> /etc/ppp/ip-up
++echo "# You may have to add S95=46 to your modem init string" >> /etc/ppp/ip-up
+ echo "# to get your modem to report the DCE = CARRIER speed." >> /etc/ppp/ip-up
+-echo "# Examples: AT&FW1 or AT&FS95=46" >> /etc/ppp/ip-up
++echo "# Example: AT&FS95=46" >> /etc/ppp/ip-up
+
+ echo >> /etc/ppp/ip-up
+ echo "if [ -s /var/log/messages ] && ( ps xc 2>/dev/null | grep -q syslogd 2>/dev/null ); then" >> /etc/ppp/ip-up
+@@ -986,7 +1017,8 @@
+ echo >> /etc/ppp/ip-up
+ echo "# End..." >> /etc/ppp/ip-up
+
+-chmod 4755 /etc/ppp/ip-up 2>/dev/null
++#chmod 4755 /etc/ppp/ip-up 2>/dev/null
++chmod 755 /etc/ppp/ip-up 2>/dev/null
+
+ if [ -s /etc/ppp/ip-down ]; then
+ mv /etc/ppp/ip-down /etc/ppp/ip-down.OLD
+@@ -1022,7 +1054,7 @@
+ # You'll see the modem reponse OK and date in the /etc/ppp/modem.cua?,
+ # modem.ttyS?, or modem.modem file.
+ # You need the 'modem-stats' program for this below to work.
+-# ftp://sunsite.unc.edu/pub/apps/serialcomm/modem
++# ftp://metalab.unc.edu/pub/apps/serialcomm/modem
+ # modem-stats-1.0.1.src.elf.tar.gz
+ # Remove the ##### from the lines below.
+
+@@ -1030,7 +1062,8 @@
+ }
+
+ ipdown > /etc/ppp/ip-down
+-chmod 4755 /etc/ppp/ip-down 2>/dev/null
++#chmod 4755 /etc/ppp/ip-down 2>/dev/null
++chmod 755 /etc/ppp/ip-down 2>/dev/null
+
+ echo "#sleep 2 # Make sure the modem is really down." >> /etc/ppp/ip-down
+ echo '#DEV=`echo $2 | sed -e "s./dev/.."`' >> /etc/ppp/ip-down
+@@ -1080,38 +1113,38 @@
+ cat <<EOF
+ grepauth() {
+
+-tail -n 30 /var/log/debug 2>/dev/null | grep -i -s "rcvd" > /tmp/grep.tmp
++tail -n 30 /var/log/debug 2>/dev/null | grep -i -s "rcvd" > $TMP/grep.tmp
+
+-if ( grep -i -q "auth pap" /tmp/grep.tmp ); then
++if ( grep -i -q "auth pap" $TMP/grep.tmp ); then
+ echo
+ echo "They seem to be requesting PAP = <auth pap> for authentication."
+ echo "I don't know if you're setup for 'PAP' or not."
+ echo "Did you answer 'PAP' when you ran pppsetup?"
+ echo
+-elif ( grep -E -i -q "auth chap msoft|auth chap 80" /tmp/grep.tmp ); then
++elif ( grep -E -i -q "auth chap msoft|auth chap 80" $TMP/grep.tmp ); then
+ echo
+ echo "They seem to be requesting MS-CHAP-80 = <auth chap 80> for authentication."
+ echo "I don't know if you're setup for 'MS-CHAP' or not."
+ echo "Did you answer 'MS-CHAP' when you ran pppsetup?"
+ echo
+-elif ( grep -i -q "auth chap" /tmp/grep.tmp ); then
++elif ( grep -i -q "auth chap" $TMP/grep.tmp ); then
+ echo "They seem to be requesting CHAP = <auth chap> for authentication."
+ echo "I don't know if you're setup for 'CHAP' or not."
+ echo "Did you answer 'CHAP' when you ran pppsetup?"
+ echo
+ else
+-rm -f /tmp/grep.tmp
++rm -f $TMP/grep.tmp
+ exit 0
+ fi
+
+-if ( grep -i -q "callback" /tmp/grep.tmp ); then
++if ( grep -i -q "callback" $TMP/grep.tmp ); then
+ echo "They seem to be requesting CALLBACK."
+ echo "I don't know if you're setup for 'callback' or not."
+ echo "Did you answer 'CALLBACK' when you ran pppsetup?"
+ echo
+ fi
+
+-rm -f /tmp/grep.tmp
++rm -f $TMP/grep.tmp
+ }
+ EOF
+ }
+@@ -1124,14 +1157,14 @@
+ echo "killall -INT pppd 2>/dev/null" >> /usr/sbin/ppp-go
+ echo "rm -f /var/lock/LCK* /var/run/ppp*.pid" >> /usr/sbin/ppp-go
+
+-if [ -s /tmp/cb1TEMP$$ ]; then
+-echo '('$PATH1' -detach connect "'$PATH2' -v -s -f /etc/ppp/callback" &) || exit 1' >> /usr/sbin/ppp-go
++if [ -s $TMP/cb1TEMP$$ ]; then
++echo '('$PATH1' -detach connect "'$PATH2' -v -f /etc/ppp/callback" &) || exit 1' >> /usr/sbin/ppp-go
+ else
+-echo '('$PATH1' -detach connect "'$PATH2' -v -s -f /etc/ppp/pppscript" &) || exit 1' >> /usr/sbin/ppp-go
++echo '('$PATH1' -detach connect "'$PATH2' -v -f /etc/ppp/pppscript" &) || exit 1' >> /usr/sbin/ppp-go
+ fi
+
+-echo "read" >> /usr/sbin/ppp-go
+-echo "ifconnect" >> /usr/sbin/ppp-go
++echo "#read" >> /usr/sbin/ppp-go
++echo "#ifconnect" >> /usr/sbin/ppp-go
+ echo "exit 0" >> /usr/sbin/ppp-go
+ echo "fi" >> /usr/sbin/ppp-go
+
+@@ -1140,10 +1173,10 @@
+ echo "killall -INT pppd 2>/dev/null" >> /usr/sbin/ppp-go
+ echo "rm -f /var/lock/LCK* /var/run/ppp*.pid" >> /usr/sbin/ppp-go
+
+-if [ -s /tmp/cb1TEMP$$ ]; then
+-echo '('$PATH1' connect "'$PATH2' -v -f /etc/ppp/callback") || exit 1' >> /usr/sbin/ppp-go
++if [ -s $TMP/cb1TEMP$$ ]; then
++echo '('$PATH1' connect "'$PATH2' -v -f /etc/ppp/callback" 1> /dev/null 2> /dev/null ) || exit 1' >> /usr/sbin/ppp-go
+ else
+-echo '('$PATH1' connect "'$PATH2' -v -f /etc/ppp/pppscript") || exit 1' >> /usr/sbin/ppp-go
++echo '('$PATH1' connect "'$PATH2' -v -f /etc/ppp/pppscript" 1> /dev/null 2> /dev/null ) || exit 1' >> /usr/sbin/ppp-go
+ fi
+
+ echo "exit 0" >> /usr/sbin/ppp-go
+@@ -1194,26 +1227,37 @@
+ echo 'echo "USAGE: ppp-go -h <Help>"' >> /usr/sbin/ppp-go
+ echo "exit 1" >> /usr/sbin/ppp-go
+
+-chmod 4755 /usr/sbin/ppp-go 2>/dev/null
++#chmod 4755 /usr/sbin/ppp-go 2>/dev/null
++chmod 755 /usr/sbin/ppp-go 2>/dev/null
+
+-echo "lock" > /etc/ppp/options
+-echo "defaultroute" >> /etc/ppp/options
+-echo "noipdefault" >> /etc/ppp/options
+-echo "modem" >> /etc/ppp/options
+-echo "/dev/$MODEM" >> /etc/ppp/options
+-echo "$BAUDRATE" >> /etc/ppp/options
+-echo "crtscts" >> /etc/ppp/options
+-echo "debug" >> /etc/ppp/options
+-echo "passive" >> /etc/ppp/options
+-echo "asyncmap 0" >> /etc/ppp/options
++cat << EOF > /etc/ppp/options
++# General configuration options for PPPD:
++lock
++defaultroute
++noipdefault
++modem
++/dev/$MODEM
++$BAUDRATE
++crtscts
++# Uncomment the line below for more verbose error reporting:
++#debug
++# If you have a default route already, pppd may require the other side
++# to authenticate itself, which most ISPs will not do. To work around this,
++# uncomment the line below. Note that this may have negative side effects
++# on system security if you allow PPP dialins. See the docs in /usr/doc/ppp*
++# for more information.
++#noauth
++passive
++asyncmap 0
++EOF
+
+ if [ ! -z "$CBPN" ]; then
+ echo 'callback "'$CBPN'"' >> /etc/ppp/options
+ fi
+
+-if [ "$MSCHAP" = "MS-CHAP-SERVER-2" ] && [ -s /tmp/rspTEMP2 ]; then
++if [ "$MSCHAP" = "MS-CHAP-SERVER-2" ] && [ -s $TMP/rspTEMP2 ]; then
+ echo 'name "'$MSDOMAIN\\\\$AUTH1'"' >> /etc/ppp/options
+-elif [ -s /tmp/rspTEMP2 ]; then
++elif [ -s $TMP/rspTEMP2 ]; then
+ echo 'name "'$AUTH1'"' >> /etc/ppp/options
+ fi
+
+@@ -1277,7 +1321,7 @@
+ echo "0.0.0.0:10.10.10.10" >> /etc/ppp/options.demand
+ echo "demand" >> /etc/ppp/options.demand
+
+-if [ -s /tmp/cb1TEMP$$ ]; then
++if [ -s $TMP/cb1TEMP$$ ]; then
+ echo 'connect "'$PATH2' -v -f /etc/ppp/callback"' >> /etc/ppp/options.demand
+ else
+ echo 'connect "'$PATH2' -v -f /etc/ppp/pppscript"' >> /etc/ppp/options.demand
+@@ -1352,18 +1396,18 @@
+ 0.0.0.0 foobar.localnet foobar
+
+ ~# dip -tv
+-dip> port /dev/cua1
+-can't open - problems with locking cua1
++dip> port /dev/ttyS1
++can't open - problems with locking ttyS1
+
+ If you get the above message after "port /dev/modem", it means you have a
+-lock file in /var/lock/LCK..cua1, remove the lock file and kill dip.
++lock file in /var/lock/LCK..ttyS1, remove the lock file and kill dip.
+
+ ~# rm /var/lock/LCK*
+ # killall -9 dip
+
+ ~# dip -tv
+
+-dip> port /dev/cua1 <-Where's the modem? cua0 = com1 cua1 = com2 etc.)
++dip> port /dev/ttyS1 <-Where's the modem? ttyS0 = com1 ttyS1 = com2 etc.)
+ dip> speed 115200 <-Modem speed: 19200 38400 57600
+ dip> term
+
+@@ -1379,7 +1423,7 @@
+ dip> default <-Use default route.)
+ dip> mode ppp <-Start PPP at your end.)
+
+-~# ping sunsite.unc.edu <-To see if you're connected.)
++~# ping metalab.unc.edu <-To see if you're connected.)
+
+ ~# dip -k <-To kill dip and the PPP connection.)
+
+@@ -1393,7 +1437,7 @@
+ lock
+ defaultroute
+ noipdefault
+-/dev/cua1 <- cua0 = com1 cua1 = com2 cua2 = com3 cua3 = com4
++/dev/ttyS1 <- ttyS0 = com1 ttyS1 = com2 ttyS2 = com3 ttyS3 = com4
+ 57600
+ modem
+ crtscts
+@@ -1419,221 +1463,221 @@
+ }
+
+ echo "=========================================================================" > /etc/ppp/pppsetup.txt
+-cat /tmp/txtTEMP01 >> /etc/ppp/pppsetup.txt
++cat $TMP/txtTEMP01 >> /etc/ppp/pppsetup.txt
+
+-echo "=========================================================================" > /tmp/txtTEMP$$
+-echo "These are your PPP configuration files and instructions..." >> /tmp/txtTEMP$$
+-echo "=========================================================================" >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-
+-if [ ! -s /tmp/cb1TEMP$$ ] && [ ! -s /tmp/sayTEMP1 ]; then
+-echo "# This is your /etc/ppp/pppscript." >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-cat /etc/ppp/pppscript >> /tmp/txtTEMP$$
+-elif [ ! -s /tmp/cb1TEMP$$ ] && [ -s /tmp/sayTEMP1 ]; then
+-echo "# This is your /etc/ppp/pppscript." >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo "Look at /etc/ppp/pppscript." >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-fi
+-
+-if [ -s /tmp/cb1TEMP$$ ]; then
+-echo "# This is your /etc/ppp/callback script." >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo "Look at /etc/ppp/callback." >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-fi
+-
+-echo "# This is your /etc/ppp/options file." >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-cat /etc/ppp/options >> /tmp/txtTEMP$$
++echo "=========================================================================" > $TMP/txtTEMP$$
++echo "These are your PPP configuration files and instructions..." >> $TMP/txtTEMP$$
++echo "=========================================================================" >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++
++if [ ! -s $TMP/cb1TEMP$$ ] && [ ! -s $TMP/sayTEMP1 ]; then
++echo "# This is your /etc/ppp/pppscript." >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++cat /etc/ppp/pppscript >> $TMP/txtTEMP$$
++elif [ ! -s $TMP/cb1TEMP$$ ] && [ -s $TMP/sayTEMP1 ]; then
++echo "# This is your /etc/ppp/pppscript." >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "Look at /etc/ppp/pppscript." >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++fi
++
++if [ -s $TMP/cb1TEMP$$ ]; then
++echo "# This is your /etc/ppp/callback script." >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "Look at /etc/ppp/callback." >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++fi
++
++echo "# This is your /etc/ppp/options file." >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++cat /etc/ppp/options >> $TMP/txtTEMP$$
+
+ if [ "$MODERROR" = "YES" ]; then
+-echo >> /tmp/txtTEMP$$
+-echo "WARNING: I could not find the modem device: '/dev/$MODEM'" >> /tmp/txtTEMP$$
+-echo "cua0 = com1 cua1 = com2 cua2 = com3 cua3 = com4" >> /tmp/txtTEMP$$
+-echo "# MAKEDEV $MODEM # /dev/MAKEDEV $MODEM" >> /tmp/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "WARNING: I could not find the modem device: '/dev/$MODEM'" >> $TMP/txtTEMP$$
++echo "ttyS0 = com1 ttyS1 = com2 ttyS2 = com3 ttyS3 = com4" >> $TMP/txtTEMP$$
++echo "# MAKEDEV $MODEM # /dev/MAKEDEV $MODEM" >> $TMP/txtTEMP$$
+ fi
+
+ if [ "$DOMAINNAME" = "unknown.com" ] && [ "$PAP" = "MS-CHAP-80" ]; then
+-echo >> /tmp/txtTEMP$$
+-echo "The remotename option is required for microsoft's ms-chap-80." >> /tmp/txtTEMP$$
+-echo "You didn't give a DOMAIN NAME so i put unknown.com, you should" >> /tmp/txtTEMP$$
+-echo "change that to your service providers domain name." >> /tmp/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "The remotename option is required for microsoft's ms-chap-80." >> $TMP/txtTEMP$$
++echo "You didn't give a DOMAIN NAME so i put unknown.com, you should" >> $TMP/txtTEMP$$
++echo "change that to your service providers domain name." >> $TMP/txtTEMP$$
+ fi
+
+ if [ ! "$MODERROR" = "YES" ]; then
+-echo >> /tmp/txtTEMP$$
+-echo "I created the symbolic link: /dev/modem -> /dev/$MODEM" >> /tmp/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "I created the symbolic link: /dev/modem -> /dev/$MODEM" >> $TMP/txtTEMP$$
+ fi
+
+-echo >> /tmp/txtTEMP$$
+-echo "# This is your /etc/ppp/options.demand dialing file." >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-cat /etc/ppp/options.demand >> /tmp/txtTEMP$$
+-
+-echo >> /tmp/txtTEMP$$
+-echo "If you have a ethernet connection you should change the local:remote" >> /tmp/txtTEMP$$
+-echo "IP addresses in the options.demand file, to your actual local and" >> /tmp/txtTEMP$$
+-echo "remote address. Example: 215.346.117.89:312.217.187.96" >> /tmp/txtTEMP$$
+-
+-echo >> /tmp/txtTEMP$$
+-echo "# This in your /etc/resolv.conf file." >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-cat /etc/resolv.conf >> /tmp/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "# This is your /etc/ppp/options.demand dialing file." >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++cat /etc/ppp/options.demand >> $TMP/txtTEMP$$
++
++echo >> $TMP/txtTEMP$$
++echo "If you have a ethernet connection you should change the local:remote" >> $TMP/txtTEMP$$
++echo "IP addresses in the options.demand file, to your actual local and" >> $TMP/txtTEMP$$
++echo "remote address. Example: 215.346.117.89:312.217.187.96" >> $TMP/txtTEMP$$
++
++echo >> $TMP/txtTEMP$$
++echo "# This in your /etc/resolv.conf file." >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++cat /etc/resolv.conf >> $TMP/txtTEMP$$
+
+-echo >> /tmp/txtTEMP$$
++echo >> $TMP/txtTEMP$$
+ if [ -z $DNSIP ]; then
+-echo "207.132.116.5 <-IMPORTANT: This should be the IP address of" >> /tmp/txtTEMP$$
+-echo " your service providers nameserver." >> /tmp/txtTEMP$$
++echo "207.132.116.5 <-IMPORTANT: This should be the IP address of" >> $TMP/txtTEMP$$
++echo " your service providers nameserver." >> $TMP/txtTEMP$$
+ else
+-echo "$DNSIP <-IMPORTANT: This should be the IP address of" >> /tmp/txtTEMP$$
+-echo " your service providers nameserver." >> /tmp/txtTEMP$$
++echo "$DNSIP <-IMPORTANT: This should be the IP address of" >> $TMP/txtTEMP$$
++echo " your service providers nameserver." >> $TMP/txtTEMP$$
+ fi
+
+ if [ -z $DNSIP ]; then
+-echo >> /tmp/txtTEMP$$
+-echo "WARNING: You didn't give a IP address for your internet service" >> /tmp/txtTEMP$$
+-echo "providers nameserver, i put '207.132.116.5' but this may not work." >> /tmp/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "WARNING: You didn't give a IP address for your internet service" >> $TMP/txtTEMP$$
++echo "providers nameserver, i put '207.132.116.5' but this may not work." >> $TMP/txtTEMP$$
+ fi
+
+ if [ "$PAP" = "CHAP" ] || [ "$PAP" = "MS-CHAP-80" ]; then
+-echo >> /tmp/txtTEMP$$
+-echo "# This is your /etc/ppp/chap-secrets file." >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo "Look at /etc/ppp/chap-secrets." >> /tmp/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "# This is your /etc/ppp/chap-secrets file." >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "Look at /etc/ppp/chap-secrets." >> $TMP/txtTEMP$$
+ fi
+
+ if [ "$DOMAINNAME" = "unknown.com" ] && [ "$PAP" = "MS-CHAP-80" ]; then
+-echo >> /tmp/txtTEMP$$
+-echo "You didn't give a DOMAIN NAME that's why i put unknown.com in" >> /tmp/txtTEMP$$
+-echo "the /etc/ppp/chap-secrets file." >> /tmp/txtTEMP$$
+-echo "You should change that to your service providers domain name." >> /tmp/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "You didn't give a DOMAIN NAME that's why i put unknown.com in" >> $TMP/txtTEMP$$
++echo "the /etc/ppp/chap-secrets file." >> $TMP/txtTEMP$$
++echo "You should change that to your service providers domain name." >> $TMP/txtTEMP$$
+ fi
+
+ if [ "$PAP" = "PAP" ]; then
+-echo >> /tmp/txtTEMP$$
+-echo "# This is your /etc/ppp/pap-secrets file." >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo "Look at /etc/ppp/pap-secrets." >> /tmp/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "# This is your /etc/ppp/pap-secrets file." >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "Look at /etc/ppp/pap-secrets." >> $TMP/txtTEMP$$
+ fi
+
+ if [ "$PATH1" = "pppd" ]; then
+-echo >> /tmp/txtTEMP$$
+-echo "ATENTION: I couldn't find <pppd> on your system." >> /tmp/txtTEMP$$
+-echo "You need <pppd> on your system to make the PPP connection." >> /tmp/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "ATENTION: I couldn't find <pppd> on your system." >> $TMP/txtTEMP$$
++echo "You need <pppd> on your system to make the PPP connection." >> $TMP/txtTEMP$$
+ fi
+
+ if [ "$PATH2" = "chat" ]; then
+-echo >> /tmp/txtTEMP$$
+-echo "ATENTION: I couldn't find <chat> on your system." >> /tmp/txtTEMP$$
+-echo "You need <chat> on your system to make the PPP connection." >> /tmp/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "ATENTION: I couldn't find <chat> on your system." >> $TMP/txtTEMP$$
++echo "You need <chat> on your system to make the PPP connection." >> $TMP/txtTEMP$$
+ fi
+
+ if [ ! "$MSG1" = "YES" ] && [ ! "$MSG2" = "YES" ]; then
+-echo >> /tmp/txtTEMP$$
+-echo "ATENTION: I couldn't find 'PPP' in the kernel or as a module." >> /tmp/txtTEMP$$
+-echo "You'll need 'PPP' in the kernel or as a module to make a PPP connection." >> /tmp/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "ATENTION: I couldn't find 'PPP' in the kernel or as a module." >> $TMP/txtTEMP$$
++echo "You'll need 'PPP' in the kernel or as a module to make a PPP connection." >> $TMP/txtTEMP$$
+ fi
+
+ if [ "$PPPRC" = "YES" ]; then
+-echo >> /tmp/txtTEMP$$
+-echo "ATENTION: I found a $HOME/.ppprc file and moved it to" >> /tmp/txtTEMP$$
+-echo ".ppprc.off, it might interfere with the PPP connection." >> /tmp/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "ATENTION: I found a $HOME/.ppprc file and moved it to" >> $TMP/txtTEMP$$
++echo ".ppprc.off, it might interfere with the PPP connection." >> $TMP/txtTEMP$$
+ fi
+
+-echo >> /tmp/txtTEMP$$
+-echo "Does everything look correct? if not, run 'pppsetup' again..." >> /tmp/txtTEMP$$
+-
+-echo >> /tmp/txtTEMP$$
+-echo "=========================================================================" >> /tmp/txtTEMP$$
+-echo "To connect to your service provider." >> /tmp/txtTEMP$$
+-echo "=========================================================================" >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo "~# ppp-go <-Make PPP connection.)" >> /tmp/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "Does everything look correct? if not, run 'pppsetup' again..." >> $TMP/txtTEMP$$
++
++echo >> $TMP/txtTEMP$$
++echo "=========================================================================" >> $TMP/txtTEMP$$
++echo "To connect to your service provider." >> $TMP/txtTEMP$$
++echo "=========================================================================" >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "~# ppp-go <-Make PPP connection.)" >> $TMP/txtTEMP$$
+
+-echo >> /tmp/txtTEMP$$
+-echo "You'll hear and see the modem dialing then once connected," >> /tmp/txtTEMP$$
+-echo "logging you in Username: or Login: and Password: etc." >> /tmp/txtTEMP$$
+-
+-echo >> /tmp/txtTEMP$$
+-echo "You won't see a Username or Login: and Password: prompt" >> /tmp/txtTEMP$$
+-echo "if they're using PAP or CHAP to authenticate you." >> /tmp/txtTEMP$$
+-
+-echo >> /tmp/txtTEMP$$
+-echo "If they use PAP or CHAP you'll just see CONNECT -- got it." >> /tmp/txtTEMP$$
+-
+-echo >> /tmp/txtTEMP$$
+-echo "If the connection was successful you'll see the Local IP and" >> /tmp/txtTEMP$$
+-echo "Remote IP address printed to the screen, you can press [Enter]." >> /tmp/txtTEMP$$
+-
+-echo >> /tmp/txtTEMP$$
+-echo "If you run ppp-go in X windows you probably won't see a Local" >> /tmp/txtTEMP$$
+-echo "and Remote IP address printed to the screen, you'll just see" >> /tmp/txtTEMP$$
+-echo "the connection process come to a end, wait a few seconds and" >> /tmp/txtTEMP$$
+-echo "press [Enter] at that point." >> /tmp/txtTEMP$$
+-
+-echo >> /tmp/txtTEMP$$
+-echo "If you don't connect for whatever reason e.g. Failed No" >> /tmp/txtTEMP$$
+-echo "Dialtone, Busy, No Carrier, Whatever, Exit, just press" >> /tmp/txtTEMP$$
+-echo "[Enter] at that point." >> /tmp/txtTEMP$$
+-
+-echo >> /tmp/txtTEMP$$
+-echo "if you have syslogd running, you can see the output messages" >> /tmp/txtTEMP$$
+-echo "from pppd and chat in the /var/log/messages and or debug file." >> /tmp/txtTEMP$$
+-
+-echo >> /tmp/txtTEMP$$
+-echo "Sample /var/log/messages file." >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo "`hostname 2>/dev/null` pppd[562]: Serial connection established." >> /tmp/txtTEMP$$
+-echo "`hostname 2>/dev/null` pppd[562]: Using interface ppp0" >> /tmp/txtTEMP$$
+-echo "`hostname 2>/dev/null` pppd[562]: Connect: ppp0 <--> /dev/modem" >> /tmp/txtTEMP$$
+-echo "`hostname 2>/dev/null` pppd[562]: local IP address 215.87.78.18" >> /tmp/txtTEMP$$
+-echo "`hostname 2>/dev/null` pppd[562]: remote IP address 205.94.97.35" >> /tmp/txtTEMP$$
+-
+-echo >> /tmp/txtTEMP$$
+-echo "You don't have a successful PPP connection until you" >> /tmp/txtTEMP$$
+-echo "receive a local & remote IP address like above." >> /tmp/txtTEMP$$
+-
+-echo >> /tmp/txtTEMP$$
+-echo "If you have the X window system, you could connect in a Xterm." >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo "`hostname 2>/dev/null` # startx" >> /tmp/txtTEMP$$
+-echo "`hostname 2>/dev/null` # ppp-go" >> /tmp/txtTEMP$$
+-echo "`hostname 2>/dev/null` # netscape mosaic etc." >> /tmp/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "You'll hear and see the modem dialing then once connected," >> $TMP/txtTEMP$$
++echo "logging you in Username: or Login: and Password: etc." >> $TMP/txtTEMP$$
++
++echo >> $TMP/txtTEMP$$
++echo "You won't see a Username or Login: and Password: prompt" >> $TMP/txtTEMP$$
++echo "if they're using PAP or CHAP to authenticate you." >> $TMP/txtTEMP$$
++
++echo >> $TMP/txtTEMP$$
++echo "If they use PAP or CHAP you'll just see CONNECT -- got it." >> $TMP/txtTEMP$$
++
++echo >> $TMP/txtTEMP$$
++echo "If the connection was successful you'll see the Local IP and" >> $TMP/txtTEMP$$
++echo "Remote IP address printed to the screen, you can press [Enter]." >> $TMP/txtTEMP$$
++
++echo >> $TMP/txtTEMP$$
++echo "If you run ppp-go in X windows you probably won't see a Local" >> $TMP/txtTEMP$$
++echo "and Remote IP address printed to the screen, you'll just see" >> $TMP/txtTEMP$$
++echo "the connection process come to a end, wait a few seconds and" >> $TMP/txtTEMP$$
++echo "press [Enter] at that point." >> $TMP/txtTEMP$$
++
++echo >> $TMP/txtTEMP$$
++echo "If you don't connect for whatever reason e.g. Failed No" >> $TMP/txtTEMP$$
++echo "Dialtone, Busy, No Carrier, Whatever, Exit, just press" >> $TMP/txtTEMP$$
++echo "[Enter] at that point." >> $TMP/txtTEMP$$
++
++echo >> $TMP/txtTEMP$$
++echo "if you have syslogd running, you can see the output messages" >> $TMP/txtTEMP$$
++echo "from pppd and chat in the /var/log/messages and or debug file." >> $TMP/txtTEMP$$
++
++echo >> $TMP/txtTEMP$$
++echo "Sample /var/log/messages file." >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "`hostname 2>/dev/null` pppd[562]: Serial connection established." >> $TMP/txtTEMP$$
++echo "`hostname 2>/dev/null` pppd[562]: Using interface ppp0" >> $TMP/txtTEMP$$
++echo "`hostname 2>/dev/null` pppd[562]: Connect: ppp0 <--> /dev/modem" >> $TMP/txtTEMP$$
++echo "`hostname 2>/dev/null` pppd[562]: local IP address 215.87.78.18" >> $TMP/txtTEMP$$
++echo "`hostname 2>/dev/null` pppd[562]: remote IP address 205.94.97.35" >> $TMP/txtTEMP$$
++
++echo >> $TMP/txtTEMP$$
++echo "You don't have a successful PPP connection until you" >> $TMP/txtTEMP$$
++echo "receive a local & remote IP address like above." >> $TMP/txtTEMP$$
++
++echo >> $TMP/txtTEMP$$
++echo "If you have the X window system, you could connect in a Xterm." >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "`hostname 2>/dev/null` # startx" >> $TMP/txtTEMP$$
++echo "`hostname 2>/dev/null` # ppp-go" >> $TMP/txtTEMP$$
++echo "`hostname 2>/dev/null` # netscape mosaic etc." >> $TMP/txtTEMP$$
+
+-echo >> /tmp/txtTEMP$$
+-echo "~# ppp-off <-To end the ppp connection.)" >> /tmp/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "~# ppp-off <-To end the ppp connection.)" >> $TMP/txtTEMP$$
+
+-echo >> /tmp/txtTEMP$$
+-echo "~# ppp-go -h <-For help.)" >> /tmp/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "~# ppp-go -h <-For help.)" >> $TMP/txtTEMP$$
+
+-echo >> /tmp/txtTEMP$$
+-echo 'There is no support in linux for "WinModems", if you have a' >> /tmp/txtTEMP$$
+-echo "WinModem you will not be able to use it in linux." >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo "There is support for plug n play modems, if you have a pnp" >> /tmp/txtTEMP$$
+-echo 'modem you may need "isapnptools" to get it recognized.' >> /tmp/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo 'There is no support in linux for "WinModems", if you have a' >> $TMP/txtTEMP$$
++echo "WinModem you will not be able to use it in linux." >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "There is support for plug n play modems, if you have a pnp" >> $TMP/txtTEMP$$
++echo 'modem you may need "isapnptools" to get it recognized.' >> $TMP/txtTEMP$$
+
+-echo >> /tmp/txtTEMP$$
+-echo "=========================================================================" >> /tmp/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "=========================================================================" >> $TMP/txtTEMP$$
+ if [ -s /usr/doc/pppsetup/pppsetup-$VERSION.README ]; then
+-echo "#### Look at the /usr/doc/pppsetup/pppsetup-$VERSION.README. ####" >> /tmp/txtTEMP$$
++echo "#### Look at the /usr/doc/pppsetup/pppsetup-$VERSION.README. ####" >> $TMP/txtTEMP$$
+ fi
+-echo "#### A copy of this text can be found in: /etc/ppp/pppsetup.txt ####" >> /tmp/txtTEMP$$
+-echo "=========================================================================" >> /tmp/txtTEMP$$
++echo "#### A copy of this text can be found in: /etc/ppp/pppsetup.txt ####" >> $TMP/txtTEMP$$
++echo "=========================================================================" >> $TMP/txtTEMP$$
+
+-echo >> /tmp/txtTEMP$$
+-echo "Done... You can exit now..." >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo "End..." >> /tmp/txtTEMP$$
+-echo "=========================================================================" >> /tmp/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "Done... You can exit now..." >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "End..." >> $TMP/txtTEMP$$
++echo "=========================================================================" >> $TMP/txtTEMP$$
+
+-dialog --title "DONE" --clear --textbox "/tmp/txtTEMP$$" 22 78
++dialog --title "DONE" --clear --textbox "$TMP/txtTEMP$$" 22 78
+
+ clear 2>/dev/null || echo
+
+-cat /tmp/txtTEMP$$ >> /etc/ppp/pppsetup.txt
++cat $TMP/txtTEMP$$ >> /etc/ppp/pppsetup.txt
+ chmod 600 /etc/ppp/pppsetup.txt 2>/dev/null
+
+ if [ ! -s /etc/syslog.conf ]; then
+@@ -1644,7 +1688,7 @@
+
+ demand >> /etc/ppp/pppsetup.txt
+ other >> /etc/ppp/pppsetup.txt
+-rm -f /tmp/*TEMP* 2>/dev/null
++rm -f $TMP/*TEMP* 2>/dev/null
+
+ killall -9 syslogd 2>/dev/null
+ syslogd & 2>/dev/null
+@@ -1659,7 +1703,7 @@
+ else
+ demand >> /etc/ppp/pppsetup.txt
+ other >> /etc/ppp/pppsetup.txt
+-rm -f /tmp/*TEMP* 2>/dev/null
++rm -f $TMP/*TEMP* 2>/dev/null
+ echo
+ echo "#### A copy of this text can be found in: /etc/ppp/pppsetup.txt ####"
+ if [ -s /usr/doc/pppsetup/pppsetup-$VERSION.README ]; then
diff --git a/patches/source/ppp/radius.msdict b/patches/source/ppp/radius.msdict
new file mode 100644
index 000000000..da3a317c0
--- /dev/null
+++ b/patches/source/ppp/radius.msdict
@@ -0,0 +1,81 @@
+#
+# Microsoft's VSA's, from RFC 2548
+#
+# $Id: dictionary.microsoft,v 1.1 2004/11/14 07:26:26 paulus Exp $
+#
+
+VENDOR Microsoft 311 Microsoft
+
+ATTRIBUTE MS-CHAP-Response 1 string Microsoft
+ATTRIBUTE MS-CHAP-Error 2 string Microsoft
+ATTRIBUTE MS-CHAP-CPW-1 3 string Microsoft
+ATTRIBUTE MS-CHAP-CPW-2 4 string Microsoft
+ATTRIBUTE MS-CHAP-LM-Enc-PW 5 string Microsoft
+ATTRIBUTE MS-CHAP-NT-Enc-PW 6 string Microsoft
+ATTRIBUTE MS-MPPE-Encryption-Policy 7 string Microsoft
+# This is referred to as both singular and plural in the RFC.
+# Plural seems to make more sense.
+ATTRIBUTE MS-MPPE-Encryption-Type 8 string Microsoft
+ATTRIBUTE MS-MPPE-Encryption-Types 8 string Microsoft
+ATTRIBUTE MS-RAS-Vendor 9 integer Microsoft
+ATTRIBUTE MS-CHAP-Domain 10 string Microsoft
+ATTRIBUTE MS-CHAP-Challenge 11 string Microsoft
+ATTRIBUTE MS-CHAP-MPPE-Keys 12 string Microsoft
+ATTRIBUTE MS-BAP-Usage 13 integer Microsoft
+ATTRIBUTE MS-Link-Utilization-Threshold 14 integer Microsoft
+ATTRIBUTE MS-Link-Drop-Time-Limit 15 integer Microsoft
+ATTRIBUTE MS-MPPE-Send-Key 16 string Microsoft
+ATTRIBUTE MS-MPPE-Recv-Key 17 string Microsoft
+ATTRIBUTE MS-RAS-Version 18 string Microsoft
+ATTRIBUTE MS-Old-ARAP-Password 19 string Microsoft
+ATTRIBUTE MS-New-ARAP-Password 20 string Microsoft
+ATTRIBUTE MS-ARAP-PW-Change-Reason 21 integer Microsoft
+
+ATTRIBUTE MS-Filter 22 string Microsoft
+ATTRIBUTE MS-Acct-Auth-Type 23 integer Microsoft
+ATTRIBUTE MS-Acct-EAP-Type 24 integer Microsoft
+
+ATTRIBUTE MS-CHAP2-Response 25 string Microsoft
+ATTRIBUTE MS-CHAP2-Success 26 string Microsoft
+ATTRIBUTE MS-CHAP2-CPW 27 string Microsoft
+
+ATTRIBUTE MS-Primary-DNS-Server 28 ipaddr Microsoft
+ATTRIBUTE MS-Secondary-DNS-Server 29 ipaddr Microsoft
+ATTRIBUTE MS-Primary-NBNS-Server 30 ipaddr Microsoft
+ATTRIBUTE MS-Secondary-NBNS-Server 31 ipaddr Microsoft
+
+#ATTRIBUTE MS-ARAP-Challenge 33 string Microsoft
+
+
+#
+# Integer Translations
+#
+
+# MS-BAP-Usage Values
+
+VALUE MS-BAP-Usage Not-Allowed 0
+VALUE MS-BAP-Usage Allowed 1
+VALUE MS-BAP-Usage Required 2
+
+# MS-ARAP-Password-Change-Reason Values
+
+VALUE MS-ARAP-PW-Change-Reason Just-Change-Password 1
+VALUE MS-ARAP-PW-Change-Reason Expired-Password 2
+VALUE MS-ARAP-PW-Change-Reason Admin-Requires-Password-Change 3
+VALUE MS-ARAP-PW-Change-Reason Password-Too-Short 4
+
+# MS-Acct-Auth-Type Values
+
+VALUE MS-Acct-Auth-Type PAP 1
+VALUE MS-Acct-Auth-Type CHAP 2
+VALUE MS-Acct-Auth-Type MS-CHAP-1 3
+VALUE MS-Acct-Auth-Type MS-CHAP-2 4
+VALUE MS-Acct-Auth-Type EAP 5
+
+# MS-Acct-EAP-Type Values
+
+VALUE MS-Acct-EAP-Type MD5 4
+VALUE MS-Acct-EAP-Type OTP 5
+VALUE MS-Acct-EAP-Type Generic-Token-Card 6
+VALUE MS-Acct-EAP-Type TLS 13
+
diff --git a/patches/source/ppp/realms b/patches/source/ppp/realms
new file mode 100644
index 000000000..344036404
--- /dev/null
+++ b/patches/source/ppp/realms
@@ -0,0 +1,22 @@
+# /etc/radiusclient/realms
+#
+# Handle realm @netservers.co.uk on an internal RADIUS server
+# (note the server must be told to strip the realm)
+
+#authserver netservers.co.uk 192.168.1.1:1812
+#acctserver netservers.co.uk 192.168.1.1:1813
+
+# users in realm @example.com are handled by separate servers
+
+#authserver example.com 10.0.0.1:1812
+#acctserver example.com 10.0.0.2:1813
+
+# the DEFAULT realm matches users that do not supply a realm
+
+#authserver DEFAULT 192.168.1.1:1812
+#acctserver DEFAULT 192.168.1.1:1813
+
+# Any realms that do not match in the realms file automatically fall
+# through to the standard radius plugin which uses the servers in the
+# radiusclient.conf file. Note that this is different than the
+# DEFAULT realm match, above.
diff --git a/patches/source/ppp/servers b/patches/source/ppp/servers
new file mode 100644
index 000000000..b061bf934
--- /dev/null
+++ b/patches/source/ppp/servers
@@ -0,0 +1,4 @@
+#Server Name or Client/Server pair Key
+#---------------- ---------------
+#portmaster.elemental.net hardlyasecret
+#portmaster2.elemental.net donttellanyone
diff --git a/patches/source/ppp/slack-desc b/patches/source/ppp/slack-desc
new file mode 100644
index 000000000..ddf6f37f4
--- /dev/null
+++ b/patches/source/ppp/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+ppp: ppp (Point-to-Point Protocol)
+ppp:
+ppp: The Point-to-Point Protocol (PPP) provides a method for transmitting
+ppp: data over serial links. It's commonly used for connecting to the
+ppp: Internet using a modem. This package includes the PPP daemon (pppd),
+ppp: which negotiates with the peer to establish the link and sets up the
+ppp: ppp network interface, and pppsetup, an easy-to-use utility for
+ppp: setting up your PPP daemon.
+ppp:
+ppp:
+ppp: