summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Schlemmer <azarah@gentoo.org>2001-11-11 19:47:03 +0000
committerMartin Schlemmer <azarah@gentoo.org>2001-11-11 19:47:03 +0000
commitdbd451391a3558e105f86a5f1beca558b1012cdc (patch)
treecc8d9d6b070986062f0fece762dc5eb5ab5243fc /net-dialup
parentadded ppp with new net.ppp0 to package.mask (diff)
downloadhistorical-dbd451391a3558e105f86a5f1beca558b1012cdc.tar.gz
historical-dbd451391a3558e105f86a5f1beca558b1012cdc.tar.bz2
historical-dbd451391a3558e105f86a5f1beca558b1012cdc.zip
version with new rc-script
Diffstat (limited to 'net-dialup')
-rw-r--r--net-dialup/ppp/files/2.4.1-r6/chat-default12
-rw-r--r--net-dialup/ppp/files/2.4.1-r6/modules.ppp7
-rw-r--r--net-dialup/ppp/files/2.4.1-r6/net.ppp0209
-rw-r--r--net-dialup/ppp/files/digest-ppp-2.4.1-r61
-rw-r--r--net-dialup/ppp/ppp-2.4.1-r6.ebuild92
5 files changed, 321 insertions, 0 deletions
diff --git a/net-dialup/ppp/files/2.4.1-r6/chat-default b/net-dialup/ppp/files/2.4.1-r6/chat-default
new file mode 100644
index 000000000000..c80f7568e8ea
--- /dev/null
+++ b/net-dialup/ppp/files/2.4.1-r6/chat-default
@@ -0,0 +1,12 @@
+'ABORT' 'BUSY'
+'ABORT' 'ERROR'
+'ABORT' 'NO ANSWER'
+'ABORT' 'NO CARRIER'
+'ABORT' 'NO DIALTONE'
+'ABORT' 'Invalid Login'
+'ABORT' 'Login incorrect'
+'' 'ATZ'
+'OK' 'ATDT$NUMBER'
+'CONNECT' ''
+'TIMEOUT' '5'
+'~--' ''
diff --git a/net-dialup/ppp/files/2.4.1-r6/modules.ppp b/net-dialup/ppp/files/2.4.1-r6/modules.ppp
new file mode 100644
index 000000000000..a37003a251f8
--- /dev/null
+++ b/net-dialup/ppp/files/2.4.1-r6/modules.ppp
@@ -0,0 +1,7 @@
+alias char-major-108 ppp_generic
+alias /dev/ppp ppp_generic
+alias tty-ldisc-3 ppp_async
+alias tty-ldisc-14 ppp_synctty
+alias ppp-compress-21 bsd_comp
+alias ppp-compress-24 ppp_deflate
+alias ppp-compress-26 ppp_deflate \ No newline at end of file
diff --git a/net-dialup/ppp/files/2.4.1-r6/net.ppp0 b/net-dialup/ppp/files/2.4.1-r6/net.ppp0
new file mode 100644
index 000000000000..55a1ec38b4e0
--- /dev/null
+++ b/net-dialup/ppp/files/2.4.1-r6/net.ppp0
@@ -0,0 +1,209 @@
+#!/sbin/runscript
+# Copyright 1999-2000 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# Author Martin Schlemmer <azarah@gentoo.org>
+# Credits To all those I got ideas from :)
+# $Header: /var/cvsroot/gentoo-x86/net-dialup/ppp/files/2.4.1-r6/net.ppp0,v 1.1 2001/11/11 19:47:03 azarah Exp $
+
+PEER="isp" # Define peer (aka ISP)
+DEBUG="no" # Turn on debugging
+PERSIST="no" # Redial after being dropped
+ONDEMAND="no" # Only bring the interface up on demand?
+MODEMPORT="/dev/ttyS0" # TTY device modem is connected to
+LINESPEED="115200" # Speed pppd should try to connect at
+INITSTRING="AT&S2=255" # Extra init string for the modem
+DEFROUTE="yes" # Must pppd set the default route?
+HARDFLOWCTL="yes" # Use hardware flow control?
+ESCAPECHARS="yes" # Use escape caracters ?
+PPPOPTIONS="" # Extra options for pppd
+USERNAME="user" # The PAP/CHAP username
+PASSWORD="passwd" # Your password/secret. Ugly I know, but i
+ # will work on something more secure later
+ # on. 700 permission on /etc/init.d/net.ppp0
+ # should be enouth for now.
+NUMBER="9180000" # The telephone number of your ISP
+REMIP="" # The ip of the remote box if it should be set
+NETMASK="" # Netmask
+IPADDR="" # Our IP if we have a static one
+MRU="768" # Sets the MRU
+MTU="768" # Sets the MTU
+RETRYTIMEOUT="60" # Retry timeout for when ONDEMAND="yes" or
+ # PERSIST="yes"
+IDLETIMEOUT="600" # Idle timeout for when ONDEMAND="yes"
+PEERDNS="no" # Should pppd set the peer dns?
+
+FWSCRIPT="/etc/init.d/firewall" # Optional FW script that pppd should start
+ # and stop when the link comes up or drop.
+ # It should be a script that takes two
+ # argument, namely the name of the external
+ # interface on which the firewall should be
+ # activated and start/stop.
+ #
+ # called: ${FWSCRIPT} ${DEVICE} [start|stop]
+
+AUTOCFGFILES="yes" # By default this scripts will generate
+ # /etc/ppp/chat-isp, /etc/ppp/chap-secrets,
+ # /etc/ppp/pap-secrets and /etc/ppp/peers/isp
+ # automagically. Set to "no" if you experience
+ # problems, or need specialized scripts. You
+ # will have to create these files by hand then.
+ # Also, the FWSTART/FWSTOP feature will not
+ # work.
+
+
+# Do not change .. for determining name of interface
+DEVICE="${1##*.}"
+
+
+local CMD_LINE
+
+checkconfig() {
+
+ if [ ! -x "`which pppd`" ] || [ ! -x "`which chat`" ] ; then
+ eerror "pppd and chat needs to be installed"
+ return 1
+ fi
+
+ if [ -e "/var/run/ppp-${DEVICE}.pid" ] && [ "${1}" = "start" ] ; then
+ eerror "ppp0 is already up"
+ return 1
+ fi
+
+ if [ ! -e "/var/run/ppp-${DEVICE}.pid" ] && [ "${1}" = "stop" ] ; then
+ eerror "ppp0 not up"
+ return 1
+ fi
+
+}
+
+start() {
+
+ checkconfig || return 1
+
+ setup_cmd_line
+ setup_cfg_files
+
+ ebegin "Bringing ${DEVICE} up"
+ if [ -x "`which pppd`" ]; then
+
+ if [ "${DEFROUTE}" = "yes" ] ; then
+ [ "`/sbin/route |grep default`" ] && route del default
+ fi
+
+ if [ "${PEERDNS}" = "yes" ] ; then
+ [ -e /etc/ppp/resolv.conf ] && mv /etc/ppp/resolv.conf
+
+ /usr/sbin/pppd ${CMD_LINE} ${MODEMPORT} ${LINESPEED} ipparam ${DEVICE} \
+ linkname ${DEVICE} call ${PEER} noauth ${PPPOPTIONS}
+ fi
+ eend
+}
+
+stop() {
+
+ checkconfig || return 1
+
+ ebegin "Bringing ${DEVICE} down"
+ if [ -x "`which ifconfig`" ]; then
+ /sbin/ifconfig ${DEVICE} down
+ fi
+ eend
+}
+
+setup_cmd_line() {
+
+ CMD_LINE="lock"
+
+ if [ "${DEBUG}" = "yes" ] ; then
+ CMD_LINE="${CMD_LINE} debug"
+ fi
+
+ if [ "${PERSIST}" = "yes" ] ; then
+ CMD_LINE="${CMD_LINE} persist holdoff ${RETRYTIMEOUT}"
+ fi
+
+ if [ "${DEFROUTE}" = "yes" ] ; then
+ CMD_LINE="${CMD_LINE} defaultroute"
+ fi
+
+ if [ "${HARDFLOWCTL}" = "yes" ] ; then
+ CMD_LINE="${CMD_LINE} modem crtscts"
+ fi
+
+ if [ "${ESCAPECHARS}" = "yes" ] ; then
+ CMD_LINE="${CMD_LINE} asyncmap 00000000"
+ fi
+
+ if [ "${PEERDNS}" = "yes" ] ; then
+ CMD_LINE="${CMD_LINE} usepeerdns"
+ fi
+
+ if [ -n "${IPADDR}${REMIP}" ] ; then
+ CMD_LINE="${CMD_LINE} ${IPADDR}:${REMIP}"
+ fi
+
+ if [ -n "${NETMASK}" ] ; then
+ CMD_LINE="${CMD_LINE} netmask ${NETMASK}"
+ fi
+
+ if [ -n "${MRU}" ] ; then
+ CMD_LINE="${CMD_LINE} mru ${MRU}"
+ fi
+
+ if [ -n "${MTU}" ] ; then
+ CMD_LINE="${CMD_LINE} mtu ${MTU}"
+ fi
+
+ if [ -n "${PAPNAME}" ] ; then
+ CMD_LINE="${CMD_LINE} user ${USERNAME} remotename ${PEER}"
+ fi
+
+ if [ "${ONDEMAND}" = "yes" ] ; then
+ CMD_LINE="${CMD_LINE} demand ktune idle ${IDLETIMEOUT} holdoff ${RETRYTIMEOUT}"
+ fi
+}
+
+setup_cfg_files() {
+
+ if [ "${AUTOCFGFILES}" = "yes" ] ; then
+
+ # Setup the peers file
+ echo "connect '/usr/sbin/chat -v -f /etc/ppp/chat-${PEER}'" \
+ >/etc/ppp/peers/${PEER}
+
+ # Setup the secrets files
+ echo "${USERNAME} ${PEER} ${PASSWORD}" >/etc/ppp/chap-secrets
+ chmod 660 /etc/ppp/chap-secrets
+ echo "${USERNAME} ${PEER} ${PASSWORD}" >/etc/ppp/pap-secrets
+ chmod 660 /etc/ppp/pap-secrets
+
+ # Setup the chat file
+ sed -e "9i\\'OK\' \'${INITSTRING}\'" \
+ -e "s:\$NUMBER:${NUMBER}:" \
+ /usr/lib/ppp/chat-default \
+ >/etc/ppp/chat-${PEER}
+
+ # Setup if-up and if-down
+ if [ -x ${FWSCRIPT} ] ; then
+
+ echo "${FWSCRIPT} \${6} start" >/etc/ppp/if-up
+ chmod 770 /etc/ppp/if-up
+ echo "${FWSCRIPT} \${6} stop" >/etc/ppp/if-down
+ chmod 770 /etc/ppp/if-down
+
+ if [ "${PEERDNS}" = "yes" ] ; then
+
+ # if-up: add the server supplied DNS entries to
+ # /etc/resolv.conf
+ echo "cp -f /etc/resolv.conf /etc/resolv.conf.old" \
+ >>/etc/ppp/if-up
+ echo "cat /etc/ppp/resolv.conf >> /etc/resolv.conf" \
+ >>/etc/ppp/if-up
+
+ # if-down: restore original /etc/resolv.conf
+ echo "mv -f /etc/resolv.conf.old /etc/resolv.conf" \
+ >>/etc/ppp/if-down
+ fi
+ fi
+ fi
+}
diff --git a/net-dialup/ppp/files/digest-ppp-2.4.1-r6 b/net-dialup/ppp/files/digest-ppp-2.4.1-r6
new file mode 100644
index 000000000000..929a534b1f4f
--- /dev/null
+++ b/net-dialup/ppp/files/digest-ppp-2.4.1-r6
@@ -0,0 +1 @@
+MD5 fbc256801d5fcd8015039b149ae95eb0 ppp-2.4.1.tar.gz 544768
diff --git a/net-dialup/ppp/ppp-2.4.1-r6.ebuild b/net-dialup/ppp/ppp-2.4.1-r6.ebuild
new file mode 100644
index 000000000000..8920ed5a41cf
--- /dev/null
+++ b/net-dialup/ppp/ppp-2.4.1-r6.ebuild
@@ -0,0 +1,92 @@
+# Copyright 1999-2001 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# Author Daniel Robbins <drobbins@gentoo.org>
+# $Header: /var/cvsroot/gentoo-x86/net-dialup/ppp/ppp-2.4.1-r6.ebuild,v 1.1 2001/11/11 19:47:03 azarah Exp $
+
+A="${P}.tar.gz"
+S=${WORKDIR}/${P}
+DESCRIPTION="Point-to-point protocol - used for communicating with your ISP"
+SRC_URI="ftp://cs.anu.edu.au/pub/software/ppp/${A}"
+
+DEPEND="virtual/glibc"
+
+
+src_compile() {
+
+ ./configure --prefix=/usr || die
+
+ #fix Makefiles to compile optimized
+ cd pppd
+ mv Makefile Makefile.orig
+ sed -e "s:COPTS = -O2 -pipe -Wall -g:COPTS = ${CFLAGS}:" \
+ -e "s/LIBS =/LIBS = -lcrypt/" \
+ Makefile.orig > Makefile
+ cd ../pppstats
+ mv Makefile Makefile.orig
+ sed -e "s:COPTS = -O:COPTS = ${CFLAGS}:" \
+ Makefile.orig > Makefile
+ cd ../chat
+ mv Makefile Makefile.orig
+ sed -e "s:-O2:${CFLAGS}:" Makefile.orig > Makefile
+ cd ../pppdump
+ mv Makefile Makefile.orig
+ sed -e "s:CFLAGS= -O:CFLAGS= ${CFLAGS}:" Makefile.orig > Makefile
+ cd ..
+
+ export CC=gcc
+
+ make || die
+}
+
+src_install() {
+
+ into /usr
+ for y in chat pppd pppdump pppstats
+ do
+ doman ${y}/${y}.8
+ dosbin ${y}/${y}
+ done
+
+ chmod u+s-w ${D}/usr/sbin/pppd
+ chown root:daemon ${D}/usr/sbin/pppstats
+
+ dodir /etc/ppp/peers
+ insinto /etc/ppp
+ insopts -m0600
+ doins etc.ppp/pap-secrets etc.ppp/chap-secrets
+ insopts -m0644
+ doins etc.ppp/options
+
+ insinto /etc
+ insopts -m0700
+ doins ${FILESDIR}/${PVR}/net.ppp0
+
+# insinto /etc/modules.d
+# doins ${FILESDIR}/${PVR}/modules.ppp
+
+ insinto /usr/lib/ppp
+ doins ${FILESDIR}/${PVR}/chat-default
+
+ dodoc PLUGINS README* SETUP Changes-2.3 FAQ
+
+
+# # Added a couple scripts to simplify dialing up
+# # borrowed from debian, man they got some nice little apps :-)
+# dosbin ${FILESDIR}/pon
+# dosbin ${FILESDIR}/poff
+# doman ${FILESDIR}/pon.1
+}
+
+pkg_postinst() {
+
+ if [ ! -e /dev/ppp ]; then
+ mknod /dev/ppp c 108 0
+ fi
+
+ echo
+ echo "#################################################################"
+ echo "# Please make sure to replace the old /etc/init.d/net.ppp0 with #"
+ echo "# the new one. #"
+ echo "#################################################################"
+ echo
+}