diff options
Diffstat (limited to 'ppp/ppp-2.4.1')
-rw-r--r-- | ppp/ppp-2.4.1/init | 50 | ||||
-rw-r--r-- | ppp/ppp-2.4.1/ip-down | 43 | ||||
-rw-r--r-- | ppp/ppp-2.4.1/ip-up | 44 | ||||
-rw-r--r-- | ppp/ppp-2.4.1/man.patch | 11 | ||||
-rw-r--r-- | ppp/ppp-2.4.1/poff | 26 | ||||
-rw-r--r-- | ppp/ppp-2.4.1/pon | 9 | ||||
-rw-r--r-- | ppp/ppp-2.4.1/pppd.patch | 68 |
7 files changed, 251 insertions, 0 deletions
diff --git a/ppp/ppp-2.4.1/init b/ppp/ppp-2.4.1/init index e69de29bb2..5b3b7abe2f 100644 --- a/ppp/ppp-2.4.1/init +++ b/ppp/ppp-2.4.1/init @@ -0,0 +1,50 @@ +#!/bin/sh +# +# /etc/init.d/ppp: start or stop PPP link. +# +# If you want PPP started on boot time (most dialup systems won't need it) +# rename the /etc/ppp/no_ppp_on_boot file to /etc/ppp/ppp_on_boot, and +# follow the instructions in the comments in that file. + +test -x /usr/sbin/pppd -a -f /etc/ppp/ppp_on_boot || exit 0 +if [ -x /etc/ppp/ppp_on_boot ]; then RUNFILE=1; fi + +case "$1" in + start) + echo -n "Starting up PPP link: pppd" + if [ "$RUNFILE" = "1" ]; then + /etc/ppp/ppp_on_boot + else + pppd call provider + fi + echo "." + ;; + stop) + echo -n "Shutting down PPP link: pppd" + if [ "$RUNFILE" = "1" ]; then + poff + else + poff provider + fi + echo "." + ;; + restart|force-reload) + echo -n "Restarting PPP link: pppd" + if [ "$RUNFILE" = "1" ]; then + poff + sleep 5 + /etc/ppp/ppp_on_boot + else + poff provider + sleep 5 + pppd call provider + fi + echo "." + ;; + *) + echo "Usage: /etc/init.d/ppp {start|stop|restart|force-reload}" + exit 1 + ;; +esac + +exit 0 diff --git a/ppp/ppp-2.4.1/ip-down b/ppp/ppp-2.4.1/ip-down index e69de29bb2..d5d3cfd7b4 100644 --- a/ppp/ppp-2.4.1/ip-down +++ b/ppp/ppp-2.4.1/ip-down @@ -0,0 +1,43 @@ +#!/bin/sh +# +# $Id$ +# +# This script is run by the pppd _after_ the link is brought down. +# It uses run-parts to run scripts in /etc/ppp/ip-down.d, so to delete +# routes, unset IP addresses etc. you should create script(s) there. +# +# Be aware that other packages may include /etc/ppp/ip-down.d scripts (named +# after that package), so choose local script names with that in mind. +# +# This script is called with the following arguments: +# Arg Name Example +# $1 Interface name ppp0 +# $2 The tty ttyS1 +# $3 The link speed 38400 +# $4 Local IP number 12.34.56.78 +# $5 Peer IP number 12.34.56.99 +# $6 Optional ``ipparam'' value foo + +# The environment is cleared before executing this script +# so the path must be reset +PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin +export PATH +# These variables are for the use of the scripts run by run-parts +PPP_IFACE="$1" +PPP_TTY="$2" +PPP_SPEED="$3" +PPP_LOCAL="$4" +PPP_REMOTE="$5" +PPP_IPPARAM="$6" +export PPP_IFACE PPP_TTY PPP_SPEED PPP_LOCAL PPP_REMOTE PPP_IPPARAM + +# as an additional convenience, $PPP_TTYNAME is set to the tty name, +# stripped of /dev/ (if present) for easier matching. +PPP_TTYNAME=`/usr/bin/basename "$2"` +export PPP_TTYNAME + +# Main Script starts here + +run-parts /etc/ppp/ip-down.d + +# last line diff --git a/ppp/ppp-2.4.1/ip-up b/ppp/ppp-2.4.1/ip-up index e69de29bb2..7cda4331f4 100644 --- a/ppp/ppp-2.4.1/ip-up +++ b/ppp/ppp-2.4.1/ip-up @@ -0,0 +1,44 @@ +#!/bin/sh +# +# $Id$ +# +# This script is run by the pppd after the link is established. +# It uses run-parts to run scripts in /etc/ppp/ip-up.d, so to add routes, +# set IP address, run the mailq etc. you should create script(s) there. +# +# Be aware that other packages may include /etc/ppp/ip-up.d scripts (named +# after that package), so choose local script names with that in mind. +# +# This script is called with the following arguments: +# Arg Name Example +# $1 Interface name ppp0 +# $2 The tty ttyS1 +# $3 The link speed 38400 +# $4 Local IP number 12.34.56.78 +# $5 Peer IP number 12.34.56.99 +# $6 Optional ``ipparam'' value foo + +# The environment is cleared before executing this script +# so the path must be reset +PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin +export PATH +# These variables are for the use of the scripts run by run-parts +PPP_IFACE="$1" +PPP_TTY="$2" +PPP_SPEED="$3" +PPP_LOCAL="$4" +PPP_REMOTE="$5" +PPP_IPPARAM="$6" +export PPP_IFACE PPP_TTY PPP_SPEED PPP_LOCAL PPP_REMOTE PPP_IPPARAM + + +# as an additional convenience, $PPP_TTYNAME is set to the tty name, +# stripped of /dev/ (if present) for easier matching. +PPP_TTYNAME=`/usr/bin/basename "$2"` +export PPP_TTYNAME + +# Main Script starts here + +run-parts /etc/ppp/ip-up.d + +# last line diff --git a/ppp/ppp-2.4.1/man.patch b/ppp/ppp-2.4.1/man.patch index e69de29bb2..2cd48d500a 100644 --- a/ppp/ppp-2.4.1/man.patch +++ b/ppp/ppp-2.4.1/man.patch @@ -0,0 +1,11 @@ +--- ppp-2.4.1/linux/Makefile.top.orig 2000-04-17 12:39:26.000000000 +0200 ++++ ppp-2.4.1/linux/Makefile.top 2004-07-03 21:59:05.000000000 +0200 +@@ -2,7 +2,7 @@ + + + BINDIR = $(DESTDIR)/usr/sbin +-MANDIR = $(DESTDIR)/usr/man ++MANDIR = $(DESTDIR)/usr/share/man + ETCDIR = $(DESTDIR)/etc/ppp + + # uid 0 = root diff --git a/ppp/ppp-2.4.1/poff b/ppp/ppp-2.4.1/poff index e69de29bb2..0521a9406a 100644 --- a/ppp/ppp-2.4.1/poff +++ b/ppp/ppp-2.4.1/poff @@ -0,0 +1,26 @@ +#!/bin/sh + +# Lets see how many pppds are running.... +set -- `cat /var/run/ppp*.pid 2>/dev/null` + +case $# in + 0) # pppd only creates a pid file once ppp is up, so let's try killing pppd + # on the assumption that we've not got that far yet. + killall pppd + ;; + 1) # If only one was running then it can be killed (apparently killall + # caused problems for some, so lets try killing the pid from the file) + kill $1 + ;; + *) # More than one! Aieehh.. Dont know which one to kill. + echo "More than one pppd running. None stopped" + exit 1 + ;; +esac + +if [ -r /var/run/ppp-quick ] +then + rm -f /var/run/ppp-quick +fi + +exit 0 diff --git a/ppp/ppp-2.4.1/pon b/ppp/ppp-2.4.1/pon index e69de29bb2..91c059501a 100644 --- a/ppp/ppp-2.4.1/pon +++ b/ppp/ppp-2.4.1/pon @@ -0,0 +1,9 @@ +#!/bin/sh + +if [ "$1" = "quick" ] +then + touch /var/run/ppp-quick + shift +fi + +/usr/sbin/pppd call ${1:-provider} diff --git a/ppp/ppp-2.4.1/pppd.patch b/ppp/ppp-2.4.1/pppd.patch index e69de29bb2..3ac61c2489 100644 --- a/ppp/ppp-2.4.1/pppd.patch +++ b/ppp/ppp-2.4.1/pppd.patch @@ -0,0 +1,68 @@ +diff -ur ppp-2.4.1_org/chat/Makefile.linux ppp-2.4.1_patch/chat/Makefile.linux +--- ppp-2.4.1_org/chat/Makefile.linux 1999-08-13 03:54:32.000000000 +0200 ++++ ppp-2.4.1_patch/chat/Makefile.linux 2004-05-17 10:03:41.000000000 +0200 +@@ -20,7 +20,7 @@ + + install: chat + mkdir -p $(BINDIR) +- $(INSTALL) -s -c chat $(BINDIR) ++ $(INSTALL) -c chat $(BINDIR) + $(INSTALL) -c -m 644 chat.8 $(MANDIR)/man8 + + clean: +diff -ur ppp-2.4.1_org/pppd/Makefile.linux ppp-2.4.1_patch/pppd/Makefile.linux +--- ppp-2.4.1_org/pppd/Makefile.linux 2001-03-08 06:00:35.000000000 +0100 ++++ ppp-2.4.1_patch/pppd/Makefile.linux 2004-05-17 10:19:09.000000000 +0200 +@@ -56,7 +56,7 @@ + + INCLUDE_DIRS= -I../include + +-COMPILE_FLAGS= -D_linux_=1 -DHAVE_PATHS_H -DIPX_CHANGE -DHAVE_MULTILINK -DHAVE_MMAP ++COMPILE_FLAGS= -D_linux_=1 -DHAVE_PATHS_H -DIPX_CHANGE -DHAVE_MULTILINK + + CFLAGS= $(COPTS) $(COMPILE_FLAGS) $(INCLUDE_DIRS) + +@@ -112,11 +112,11 @@ + endif + + +-INSTALL= install -o root ++INSTALL= install + + install: pppd + mkdir -p $(BINDIR) $(MANDIR) +- $(INSTALL) -s -c -m 555 pppd $(BINDIR)/pppd ++ $(INSTALL) -c -m 555 pppd $(BINDIR)/pppd + if chgrp pppusers $(BINDIR)/pppd 2>/dev/null; then \ + chmod o-rx,u+s $(BINDIR)/pppd; fi + $(INSTALL) -c -m 444 pppd.8 $(MANDIR)/man8 +diff -ur ppp-2.4.1_org/pppdump/Makefile.linux ppp-2.4.1_patch/pppdump/Makefile.linux +--- ppp-2.4.1_org/pppdump/Makefile.linux 1999-07-26 13:09:29.000000000 +0200 ++++ ppp-2.4.1_patch/pppdump/Makefile.linux 2004-05-17 10:04:20.000000000 +0200 +@@ -13,5 +13,5 @@ + + install: + mkdir -p $(BINDIR) $(MANDIR)/man8 +- $(INSTALL) -s -c pppdump $(BINDIR) ++ $(INSTALL) -c pppdump $(BINDIR) + $(INSTALL) -c -m 444 pppdump.8 $(MANDIR)/man8 +diff -ur ppp-2.4.1_org/pppstats/Makefile.linux ppp-2.4.1_patch/pppstats/Makefile.linux +--- ppp-2.4.1_org/pppstats/Makefile.linux 1998-03-25 03:21:19.000000000 +0100 ++++ ppp-2.4.1_patch/pppstats/Makefile.linux 2004-05-17 10:22:03.000000000 +0200 +@@ -11,14 +11,14 @@ + COMPILE_FLAGS = -D_linux_ -I../include + LIBS = + +-INSTALL= install -o root -g daemon ++INSTALL= install + + CFLAGS = $(COPTS) $(COMPILE_FLAGS) + + all: pppstats + + install: pppstats +- $(INSTALL) -s -c pppstats $(BINDIR)/pppstats ++ $(INSTALL) -c pppstats $(BINDIR)/pppstats + $(INSTALL) -c -m 444 pppstats.8 $(MANDIR)/man8/pppstats.8 + + pppstats: $(PPPSTATSRCS) |