From: <kr...@us...> - 2006-08-11 15:33:21
|
Revision: 230 Author: krisk84 Date: 2006-08-11 08:33:14 -0700 (Fri, 11 Aug 2006) ViewCVS: http://svn.sourceforge.net/astlinux/?rev=230&view=rev Log Message: ----------- rp-pppoe that actually works Modified Paths: -------------- trunk/package/Config.in trunk/package/pppd/pppd.mk Added Paths: ----------- trunk/package/rp-pppoe/ trunk/package/rp-pppoe/Config.in trunk/package/rp-pppoe/rp-pppoe-3.5-Makefile.patch trunk/package/rp-pppoe/rp-pppoe-3.5-configure.patch trunk/package/rp-pppoe/rp-pppoe-3.5-scripts-fixes.patch trunk/package/rp-pppoe/rp-pppoe.mk Removed Paths: ------------- trunk/target/generic/target_skeleton/usr/sbin/adsl-connect trunk/target/generic/target_skeleton/usr/sbin/adsl-start trunk/target/generic/target_skeleton/usr/sbin/adsl-status trunk/target/generic/target_skeleton/usr/sbin/adsl-stop Modified: trunk/package/Config.in =================================================================== --- trunk/package/Config.in 2006-08-11 15:31:17 UTC (rev 229) +++ trunk/package/Config.in 2006-08-11 15:33:14 UTC (rev 230) @@ -134,6 +134,7 @@ source "package/raidtools/Config.in" source "package/readline/Config.in" source "package/resconv/Config.in" +source "package/rp-pppoe/Config.in" source "package/rsync/Config.in" source "package/ruby/Config.in" source "package/rxvt/Config.in" Modified: trunk/package/pppd/pppd.mk =================================================================== --- trunk/package/pppd/pppd.mk 2006-08-11 15:31:17 UTC (rev 229) +++ trunk/package/pppd/pppd.mk 2006-08-11 15:33:14 UTC (rev 230) @@ -60,7 +60,7 @@ rm -rf $(TARGET_DIR)/usr/share/locale $(TARGET_DIR)/usr/info \ $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc $(TARGET_DIR)/usr/share/man $(TARGET_DIR)/usr/include ln -sf /tmp/etc/ppp $(TARGET_DIR)/etc/ppp - ln -sf /usr/lib/pppd/2.4.3 $(TARGET_DIR)/usr/lib/ppp + # ln -sf /usr/lib/pppd/2.4.3 $(TARGET_DIR)/usr/lib/ppp pppd: uclibc $(TARGET_DIR)/$(PPPD_TARGET_BINARY) Added: trunk/package/rp-pppoe/Config.in =================================================================== --- trunk/package/rp-pppoe/Config.in (rev 0) +++ trunk/package/rp-pppoe/Config.in 2006-08-11 15:33:14 UTC (rev 230) @@ -0,0 +1,8 @@ +config BR2_PACKAGE_RP-PPPOE + bool "rp-pppoe" + default n + help + rp-pppoe is a PPPoE implementation for linux + + http://www.roaringpenguin.com/penguin/open_source_rp-pppoe.php + Added: trunk/package/rp-pppoe/rp-pppoe-3.5-Makefile.patch =================================================================== --- trunk/package/rp-pppoe/rp-pppoe-3.5-Makefile.patch (rev 0) +++ trunk/package/rp-pppoe/rp-pppoe-3.5-Makefile.patch 2006-08-11 15:33:14 UTC (rev 230) @@ -0,0 +1,217 @@ +diff -ruN rp-pppoe-3.5-orig/src/Makefile.in rp-pppoe-3.5-4/src/Makefile.in +--- rp-pppoe-3.5-orig/src/Makefile.in 2002-07-08 16:38:24.000000000 +0200 ++++ rp-pppoe-3.5-4/src/Makefile.in 2005-03-09 16:37:38.000000000 +0100 +@@ -62,21 +62,23 @@ + TARGETS=@TARGETS@ + PPPOE_SERVER_LIBS=$(LIC_LIBDIR) $(LIC_LIB) + ++LIBS="-lc" ++ + all: $(TARGETS) + @echo "" + @echo "Type 'make install' as root to install the software." + + pppoe-sniff: pppoe-sniff.o if.o common.o debug.o +- @CC@ -o pppoe-sniff pppoe-sniff.o if.o common.o debug.o ++ @CC@ $(CFLAGS) -o pppoe-sniff pppoe-sniff.o if.o common.o debug.o $(LIBS) + + pppoe-server: pppoe-server.o if.o debug.o common.o md5.o libevent/libevent.a @PPPOE_SERVER_DEPS@ +- @CC@ -o pppoe-server @RDYNAMIC@ pppoe-server.o if.o debug.o common.o md5.o $(PPPOE_SERVER_LIBS) -Llibevent -levent ++ @CC@ $(CFLAGS) -o pppoe-server @RDYNAMIC@ pppoe-server.o if.o debug.o common.o md5.o $(PPPOE_SERVER_LIBS) -Llibevent -levent $(LIBS) + + pppoe: pppoe.o if.o debug.o common.o ppp.o discovery.o +- @CC@ -o pppoe pppoe.o if.o debug.o common.o ppp.o discovery.o ++ @CC@ $(CFLAGS) -o pppoe pppoe.o if.o debug.o common.o ppp.o discovery.o $(LIBS) + + pppoe-relay: relay.o if.o debug.o common.o +- @CC@ -o pppoe-relay relay.o if.o debug.o common.o ++ @CC@ $(CFLAGS) -o pppoe-relay relay.o if.o debug.o common.o $(LIBS) + + pppoe.o: pppoe.c pppoe.h + @CC@ $(CFLAGS) '-DVERSION="$(VERSION)"' -c -o pppoe.o pppoe.c +@@ -119,7 +121,7 @@ + @CC@ '-DRP_VERSION="$(VERSION)"' $(CFLAGS) -I$(PPPD_INCDIR) -c -o plugin/plugin.o -fPIC plugin.c + + plugin/libplugin.a: plugin/discovery.o plugin/if.o plugin/common.o plugin/debug.o +- ar -rc $@ $^ ++ $(AR) -rc $@ $^ + + plugin/discovery.o: discovery.c + @CC@ $(CFLAGS) '-DVERSION="$(VERSION)"' -c -o plugin/discovery.o -fPIC discovery.c +@@ -134,78 +136,78 @@ + @CC@ $(CFLAGS) '-DVERSION="$(VERSION)"' -c -o plugin/common.o -fPIC common.c + + install: all +- -mkdir -p $(RPM_INSTALL_ROOT)$(sbindir) +- $(install) -m 755 -s pppoe $(RPM_INSTALL_ROOT)$(sbindir) +- $(install) -m 755 -s pppoe-server $(RPM_INSTALL_ROOT)$(sbindir) +- if test -x licensed-only/pppoe-server-control ; then $(install) -m 755 -s licensed-only/pppoe-server-control $(RPM_INSTALL_ROOT)$(sbindir); fi +- if test -x pppoe-relay ; then $(install) -m 755 -s pppoe-relay $(RPM_INSTALL_ROOT)$(sbindir); fi +- if test -x pppoe-sniff; then $(install) -m 755 -s pppoe-sniff $(RPM_INSTALL_ROOT)$(sbindir); fi +- $(install) -m 755 ../scripts/adsl-connect $(RPM_INSTALL_ROOT)$(sbindir) +- $(install) -m 755 ../scripts/adsl-start $(RPM_INSTALL_ROOT)$(sbindir) +- $(install) -m 755 ../scripts/adsl-status $(RPM_INSTALL_ROOT)$(sbindir) +- $(install) -m 755 ../scripts/adsl-stop $(RPM_INSTALL_ROOT)$(sbindir) +- $(install) -m 755 ../scripts/adsl-setup $(RPM_INSTALL_ROOT)$(sbindir) +- -mkdir -p $(RPM_INSTALL_ROOT)$(docdir) +- $(install) -m 644 ../doc/CHANGES $(RPM_INSTALL_ROOT)$(docdir) +- $(install) -m 644 ../doc/KERNEL-MODE-PPPOE $(RPM_INSTALL_ROOT)$(docdir) +- $(install) -m 644 ../doc/HOW-TO-CONNECT $(RPM_INSTALL_ROOT)$(docdir) +- $(install) -m 644 ../doc/LICENSE $(RPM_INSTALL_ROOT)$(docdir) +- $(install) -m 644 ../README $(RPM_INSTALL_ROOT)$(docdir) +- $(install) -m 644 ../SERVPOET $(RPM_INSTALL_ROOT)$(docdir) +- $(install) -m 644 ../configs/pap-secrets $(RPM_INSTALL_ROOT)$(docdir) +- -mkdir -p $(RPM_INSTALL_ROOT)$(mandir)/man8 ++ -mkdir -p $(RPM_INSTALL_ROOT)$(DESTDIR)$(sbindir) ++ $(install) -m 755 pppoe $(RPM_INSTALL_ROOT)$(DESTDIR)$(sbindir) ++ $(install) -m 755 pppoe-server $(RPM_INSTALL_ROOT)$(DESTDIR)$(sbindir) ++ if test -x licensed-only/pppoe-server-control ; then $(install) -m 755 licensed-only/pppoe-server-control $(RPM_INSTALL_ROOT)$(DESTDIR)$(sbindir); fi ++ if test -x pppoe-relay ; then $(install) -m 755 pppoe-relay $(RPM_INSTALL_ROOT)$(DESTDIR)$(sbindir); fi ++ if test -x pppoe-sniff; then $(install) -m 755 pppoe-sniff $(RPM_INSTALL_ROOT)$(DESTDIR)$(sbindir); fi ++ $(install) -m 755 ../scripts/adsl-connect $(RPM_INSTALL_ROOT)$(DESTDIR)$(sbindir) ++ $(install) -m 755 ../scripts/adsl-start $(RPM_INSTALL_ROOT)$(DESTDIR)$(sbindir) ++ $(install) -m 755 ../scripts/adsl-status $(RPM_INSTALL_ROOT)$(DESTDIR)$(sbindir) ++ $(install) -m 755 ../scripts/adsl-stop $(RPM_INSTALL_ROOT)$(DESTDIR)$(sbindir) ++ $(install) -m 755 ../scripts/adsl-setup $(RPM_INSTALL_ROOT)$(DESTDIR)$(sbindir) ++ -mkdir -p $(RPM_INSTALL_ROOT)$(DESTDIR)$(docdir) ++ $(install) -m 644 ../doc/CHANGES $(RPM_INSTALL_ROOT)$(DESTDIR)$(docdir) ++ $(install) -m 644 ../doc/KERNEL-MODE-PPPOE $(RPM_INSTALL_ROOT)$(DESTDIR)$(docdir) ++ $(install) -m 644 ../doc/HOW-TO-CONNECT $(RPM_INSTALL_ROOT)$(DESTDIR)$(docdir) ++ $(install) -m 644 ../doc/LICENSE $(RPM_INSTALL_ROOT)$(DESTDIR)$(docdir) ++ $(install) -m 644 ../README $(RPM_INSTALL_ROOT)$(DESTDIR)$(docdir) ++ $(install) -m 644 ../SERVPOET $(RPM_INSTALL_ROOT)$(DESTDIR)$(docdir) ++ $(install) -m 644 ../configs/pap-secrets $(RPM_INSTALL_ROOT)$(DESTDIR)$(docdir) ++ -mkdir -p $(RPM_INSTALL_ROOT)$(DESTDIR)$(mandir)/man8 + for i in $(TARGETS) ; do \ + if test -f ../man/$$i.8 ; then \ +- $(install) -m 644 ../man/$$i.8 $(RPM_INSTALL_ROOT)$(mandir)/man8 || exit 1; \ ++ $(install) -m 644 ../man/$$i.8 $(RPM_INSTALL_ROOT)$(DESTDIR)$(mandir)/man8 || exit 1; \ + fi; \ + done +- $(install) -m 644 ../man/adsl-start.8 $(RPM_INSTALL_ROOT)$(mandir)/man8 +- $(install) -m 644 ../man/adsl-stop.8 $(RPM_INSTALL_ROOT)$(mandir)/man8 +- $(install) -m 644 ../man/adsl-status.8 $(RPM_INSTALL_ROOT)$(mandir)/man8 +- $(install) -m 644 ../man/adsl-connect.8 $(RPM_INSTALL_ROOT)$(mandir)/man8 +- $(install) -m 644 ../man/adsl-setup.8 $(RPM_INSTALL_ROOT)$(mandir)/man8 +- -mkdir -p $(RPM_INSTALL_ROOT)$(mandir)/man5 +- $(install) -m 644 ../man/pppoe.conf.5 $(RPM_INSTALL_ROOT)$(mandir)/man5 +- -mkdir -p $(RPM_INSTALL_ROOT)/etc/ppp +- -mkdir -p $(RPM_INSTALL_ROOT)$(PLUGIN_DIR) +- -echo "# Directory created by rp-pppoe for kernel-mode plugin" > $(RPM_INSTALL_ROOT)$(PLUGIN_DIR)/README +- @if test -r rp-pppoe.so; then $(install) -m 755 rp-pppoe.so $(RPM_INSTALL_ROOT)$(PLUGIN_DIR); fi +- @for i in pppoe.conf firewall-standalone firewall-masq ; do \ +- if [ ! -f $(RPM_INSTALL_ROOT)/etc/ppp/$$i ] ; then \ +- $(install) -m 644 ../configs/$$i $(RPM_INSTALL_ROOT)/etc/ppp ; \ ++ $(install) -m 644 ../man/adsl-start.8 $(RPM_INSTALL_ROOT)$(DESTDIR)$(mandir)/man8 ++ $(install) -m 644 ../man/adsl-stop.8 $(RPM_INSTALL_ROOT)$(DESTDIR)$(mandir)/man8 ++ $(install) -m 644 ../man/adsl-status.8 $(RPM_INSTALL_ROOT)$(DESTDIR)$(mandir)/man8 ++ $(install) -m 644 ../man/adsl-connect.8 $(RPM_INSTALL_ROOT)$(DESTDIR)$(mandir)/man8 ++ $(install) -m 644 ../man/adsl-setup.8 $(RPM_INSTALL_ROOT)$(DESTDIR)$(mandir)/man8 ++ -mkdir -p $(RPM_INSTALL_ROOT)$(DESTDIR)$(mandir)/man5 ++ $(install) -m 644 ../man/pppoe.conf.5 $(RPM_INSTALL_ROOT)$(DESTDIR)$(mandir)/man5 ++ -mkdir -p $(RPM_INSTALL_ROOT)$(DESTDIR)/etc/ppp ++ -mkdir -p $(RPM_INSTALL_ROOT)$(DESTDIR)$(PLUGIN_DIR) ++ -echo "# Directory created by rp-pppoe for kernel-mode plugin" > $(RPM_INSTALL_ROOT)$(DESTDIR)$(PLUGIN_DIR)/README ++ @if test -r rp-pppoe.so; then $(install) -m 755 rp-pppoe.so $(RPM_INSTALL_ROOT)$(DESTDIR)$(PLUGIN_DIR); fi ++ @for i in pppoe.conf; do \ ++ if [ ! -f $(RPM_INSTALL_ROOT)$(DESTDIR)/etc/$$i ] ; then \ ++ $(install) -m 644 ../configs/$$i $(RPM_INSTALL_ROOT)$(DESTDIR)/etc ; \ + else \ +- echo "NOT overwriting existing $(RPM_INSTALL_ROOT)/etc/ppp/$$i" ;\ +- $(install) -m 644 ../configs/$$i $(RPM_INSTALL_ROOT)/etc/ppp/$$i-$(VERSION) ;\ ++ echo "NOT overwriting existing $(RPM_INSTALL_ROOT)$(DESTDIR)/etc/$$i" ;\ ++ $(install) -m 644 ../configs/$$i $(RPM_INSTALL_ROOT)$(DESTDIR)/etc/$$i-$(VERSION) ;\ + fi ;\ + done +- @if [ ! -f $(RPM_INSTALL_ROOT)$(PPPOESERVER_PPPD_OPTIONS) ] ; then \ +- $(install) -m 644 ../configs/pppoe-server-options $(RPM_INSTALL_ROOT)$(PPPOESERVER_PPPD_OPTIONS) ; \ ++ @if [ ! -f $(RPM_INSTALL_ROOT)$(DESTDIR)$(PPPOESERVER_PPPD_OPTIONS) ] ; then \ ++ $(install) -m 644 ../configs/pppoe-server-options $(RPM_INSTALL_ROOT)$(DESTDIR)$(PPPOESERVER_PPPD_OPTIONS) ; \ + else \ +- echo "NOT overwriting existing $(RPM_INSTALL_ROOT)$(PPPOESERVER_PPPD_OPTIONS)"; \ +- $(install) -m 644 ../configs/pppoe-server-options $(RPM_INSTALL_ROOT)$(PPPOESERVER_PPPD_OPTIONS)-example ; \ ++ echo "NOT overwriting existing $(RPM_INSTALL_ROOT)$(DESTDIR)$(PPPOESERVER_PPPD_OPTIONS)"; \ ++ $(install) -m 644 ../configs/pppoe-server-options $(RPM_INSTALL_ROOT)$(DESTDIR)$(PPPOESERVER_PPPD_OPTIONS)-example ; \ + fi + @if [ -f /etc/redhat-release ] ; then \ +- echo "Looks like a Red Hat system; installing $(RPM_INSTALL_ROOT)/etc/rc.d/init.d/adsl" ; \ +- mkdir -p $(RPM_INSTALL_ROOT)/etc/rc.d/init.d ;\ +- $(install) -m 755 ../scripts/adsl-init $(RPM_INSTALL_ROOT)/etc/rc.d/init.d/adsl ; \ ++ echo "Looks like a Red Hat system; installing $(RPM_INSTALL_ROOT)$(DESTDIR)/etc/rc.d/init.d/adsl" ; \ ++ mkdir -p $(RPM_INSTALL_ROOT)$(DESTDIR)/etc/rc.d/init.d ;\ ++ $(install) -m 755 ../scripts/adsl-init $(RPM_INSTALL_ROOT)$(DESTDIR)/etc/rc.d/init.d/adsl ; \ + fi + @if [ -f /etc/turbolinux-release ] ; then \ +- echo "Looks like a TurboLinux system; installing $(RPM_INSTALL_ROOT)/etc/rc.d/init.d/adsl" ; \ +- mkdir -p $(RPM_INSTALL_ROOT)/etc/rc.d/init.d ;\ +- $(install) -m 755 ../scripts/adsl-init-turbolinux $(RPM_INSTALL_ROOT)/etc/rc.d/init.d/adsl ; \ ++ echo "Looks like a TurboLinux system; installing $(RPM_INSTALL_ROOT)$(DESTDIR)/etc/rc.d/init.d/adsl" ; \ ++ mkdir -p $(RPM_INSTALL_ROOT)$(DESTDIR)/etc/rc.d/init.d ;\ ++ $(install) -m 755 ../scripts/adsl-init-turbolinux $(RPM_INSTALL_ROOT)$(DESTDIR)/etc/rc.d/init.d/adsl ; \ + fi + @if [ -f /etc/SuSE-release ] ; then \ +- echo "Looks like a SuSE Linux system; installing $(RPM_INSTALL_ROOT)/etc/rc.d/init.d/adsl" ; \ +- mkdir -p $(RPM_INSTALL_ROOT)/etc/rc.d/init.d ;\ +- $(install) -m 755 ../scripts/adsl-init-suse $(RPM_INSTALL_ROOT)/etc/rc.d/init.d/adsl ; \ ++ echo "Looks like a SuSE Linux system; installing $(RPM_INSTALL_ROOT)$(DESTDIR)/etc/rc.d/init.d/adsl" ; \ ++ mkdir -p $(RPM_INSTALL_ROOT)$(DESTDIR)/etc/rc.d/init.d ;\ ++ $(install) -m 755 ../scripts/adsl-init-suse $(RPM_INSTALL_ROOT)$(DESTDIR)/etc/rc.d/init.d/adsl ; \ + fi + + # L2TP + @if [ -f l2tp/handlers/sync-pppd.so ] ; then \ +- mkdir -p $(RPM_INSTALL_ROOT)/usr/lib/l2tp/plugins ; \ +- $(install) -m 755 l2tp/handlers/sync-pppd.so $(RPM_INSTALL_ROOT)/usr/lib/l2tp/plugins ; \ +- mkdir -p $(RPM_INSTALL_ROOT)/etc/l2tp ; \ +- $(install) -m 600 l2tp/l2tp.conf $(RPM_INSTALL_ROOT)/etc/l2tp/l2tp.conf.example ; \ ++ mkdir -p $(RPM_INSTALL_ROOT)$(DESTDIR)/usr/lib/l2tp/plugins ; \ ++ $(install) -m 755 l2tp/handlers/sync-pppd.so $(RPM_INSTALL_ROOT)$(DESTDIR)/usr/lib/l2tp/plugins ; \ ++ mkdir -p $(RPM_INSTALL_ROOT)$(DESTDIR)/etc/l2tp ; \ ++ $(install) -m 600 l2tp/l2tp.conf $(RPM_INSTALL_ROOT)$(DESTDIR)/etc/l2tp/l2tp.conf.example ; \ + fi + @echo "" + @echo "Type 'adsl-setup' to configure the software." +@@ -288,7 +290,7 @@ + cd .. && rpm -ba servpoet.spec + + clean: +- rm -f *.o pppoe pppoe-sniff pppoe-server core rp-pppoe.so plugin/*.o plugin/libplugin.a *~ ++ rm -f *.o pppoe pppoe-relay pppoe-sniff pppoe-server core rp-pppoe.so plugin/*.o plugin/libplugin.a *~ + test -f licensed-only/Makefile && $(MAKE) -C licensed-only clean || true + test -f libevent/Makefile && $(MAKE) -C libevent clean || true + test -f l2tp/Makefile && $(MAKE) -C l2tp clean || true +diff -ruN rp-pppoe-3.5-orig/src/libevent/Makefile.in rp-pppoe-3.5-4/src/libevent/Makefile.in +--- rp-pppoe-3.5-orig/src/libevent/Makefile.in 2002-07-08 16:38:24.000000000 +0200 ++++ rp-pppoe-3.5-4/src/libevent/Makefile.in 2005-03-09 16:37:38.000000000 +0100 +@@ -18,24 +18,24 @@ + + libevent.a: $(OBJS) + rm -f libevent.a +- ar -cq libevent.a $(OBJS) ++ $(AR) r libevent.a $(OBJS) + @RANLIB@ libevent.a + + event.o: event.c $(HDRS) +- gcc $(CFLAGS) -c -o event.o event.c ++ @CC@ $(CFLAGS) -c -o event.o event.c + + hash.o: hash.c $(HDRS) +- gcc $(CFLAGS) -c -o hash.o hash.c ++ @CC@ $(CFLAGS) -c -o hash.o hash.c + + event_sig.o: event_sig.c $(HDRS) +- gcc $(CFLAGS) -c -o event_sig.o event_sig.c ++ @CC@ $(CFLAGS) -c -o event_sig.o event_sig.c + + event_tcp.o: event_tcp.c $(HDRS) +- gcc $(CFLAGS) -c -o event_tcp.o event_tcp.c ++ @CC@ $(CFLAGS) -c -o event_tcp.o event_tcp.c + + clean: FORCE + rm -f *.a *.o *~ + + FORCE: + +-.phony: FORCE +\ No newline at end of file ++.phony: FORCE Added: trunk/package/rp-pppoe/rp-pppoe-3.5-configure.patch =================================================================== --- trunk/package/rp-pppoe/rp-pppoe-3.5-configure.patch (rev 0) +++ trunk/package/rp-pppoe/rp-pppoe-3.5-configure.patch 2006-08-11 15:33:14 UTC (rev 230) @@ -0,0 +1,241 @@ +diff -ruN rp-pppoe-3.5-orig/src/configure rp-pppoe-3.5-4/src/configure +--- rp-pppoe-3.5-orig/src/configure 2002-07-08 16:38:24.000000000 +0200 ++++ rp-pppoe-3.5-4/src/configure 2005-03-09 16:37:38.000000000 +0100 +@@ -1707,6 +1707,7 @@ + #line 1708 "configure" + #include "confdefs.h" + #include <stdio.h> ++#include <sys/types.h> + main() + { + FILE *f=fopen("conftestval", "w"); +@@ -1715,7 +1716,7 @@ + exit(0); + } + EOF +-if { (eval echo configure:1719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:1720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + ac_cv_sizeof_unsigned_short=`cat conftestval` + else +@@ -1735,7 +1736,7 @@ + + + echo $ac_n "checking size of unsigned int""... $ac_c" 1>&6 +-echo "configure:1739: checking size of unsigned int" >&5 ++echo "configure:1740: checking size of unsigned int" >&5 + if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_int'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -1743,9 +1744,10 @@ + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } + else + cat > conftest.$ac_ext <<EOF +-#line 1747 "configure" ++#line 1748 "configure" + #include "confdefs.h" + #include <stdio.h> ++#include <sys/types.h> + main() + { + FILE *f=fopen("conftestval", "w"); +@@ -1754,7 +1756,7 @@ + exit(0); + } + EOF +-if { (eval echo configure:1758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:1760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + ac_cv_sizeof_unsigned_int=`cat conftestval` + else +@@ -1774,7 +1776,7 @@ + + + echo $ac_n "checking size of unsigned long""... $ac_c" 1>&6 +-echo "configure:1778: checking size of unsigned long" >&5 ++echo "configure:1780: checking size of unsigned long" >&5 + if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_long'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -1782,9 +1784,10 @@ + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } + else + cat > conftest.$ac_ext <<EOF +-#line 1786 "configure" ++#line 1788 "configure" + #include "confdefs.h" + #include <stdio.h> ++#include <sys/types.h> + main() + { + FILE *f=fopen("conftestval", "w"); +@@ -1793,7 +1796,7 @@ + exit(0); + } + EOF +-if { (eval echo configure:1797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:1800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + ac_cv_sizeof_unsigned_long=`cat conftestval` + else +@@ -1816,7 +1819,7 @@ + # Extract the first word of "pppd", so it can be a program name with args. + set dummy pppd; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:1820: checking for $ac_word" >&5 ++echo "configure:1823: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_path_PPPD'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -1853,7 +1856,7 @@ + # Extract the first word of "setsid", so it can be a program name with args. + set dummy setsid; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:1857: checking for $ac_word" >&5 ++echo "configure:1860: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_path_SETSID'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -1890,7 +1893,7 @@ + # Extract the first word of "id", so it can be a program name with args. + set dummy id; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:1894: checking for $ac_word" >&5 ++echo "configure:1897: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_path_ID'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -1925,14 +1928,11 @@ + + + echo $ac_n "checking for Linux 2.4.X kernel-mode PPPoE support""... $ac_c" 1>&6 +-echo "configure:1929: checking for Linux 2.4.X kernel-mode PPPoE support" >&5 +-if test "`uname -s`" = "Linux" ; then +-modprobe ppp_generic > /dev/null 2>&1 +-modprobe ppp_async > /dev/null 2>&1 +-modprobe n_hdlc > /dev/null 2>&1 +-modprobe ppp_synctty > /dev/null 2>&1 +-modprobe pppoe > /dev/null 2>&1 +-if test "$cross_compiling" = yes; then ++echo "configure:1932: checking for Linux 2.4.X kernel-mode PPPoE support" >&5 ++if eval "test \"`echo '$''{'ac_cv_linux_kernel_pppoe'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ if test "$cross_compiling" = yes; then + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } + else + cat > conftest.$ac_ext <<EOF +@@ -1960,10 +1960,10 @@ + rm -fr conftest* + fi + +-else +- ac_cv_linux_kernel_pppoe=no + fi + ++echo "$ac_t""$ac_cv_linux_kernel_pppoe" 1>&6 ++ + $ECHO $ac_cv_linux_kernel_pppoe + if test "$ac_cv_linux_kernel_pppoe" != yes ; then + if test "$LINUX_KERNELMODE_PLUGIN" = rp-pppoe.so; then +@@ -2018,11 +2018,14 @@ + + echo $ac_n "checking packing order of bit fields""... $ac_c" 1>&6 + echo "configure:2021: checking packing order of bit fields" >&5 +-if test "$cross_compiling" = yes; then ++if eval "test \"`echo '$''{'ac_cv_pack_bitfields_reversed'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ if test "$cross_compiling" = yes; then + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } + else + cat > conftest.$ac_ext <<EOF +-#line 2026 "configure" ++#line 2029 "configure" + #include "confdefs.h" + + union foo { +@@ -2048,20 +2051,23 @@ + } + } + EOF +-if { (eval echo configure:2052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:2055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then +- PACK=normal ++ ac_cv_pack_bitfields_reversed=no + else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* +- PACK=rev ++ ac_cv_pack_bitfields_reversed=yes + fi + rm -fr conftest* + fi + ++fi ++ ++echo "$ac_t""$ac_cv_pack_bitfields_reversed" 1>&6 + +-if test "$PACK" = "rev" ; then ++if test "$ac_cv_pack_bitfields_reversed" = "yes" ; then + $ECHO "reversed" + cat >> confdefs.h <<\EOF + #define PACK_BITFIELDS_REVERSED 1 +diff -ruN rp-pppoe-3.5-orig/src/configure.in rp-pppoe-3.5-4/src/configure.in +--- rp-pppoe-3.5-orig/src/configure.in 2002-07-08 16:38:24.000000000 +0200 ++++ rp-pppoe-3.5-4/src/configure.in 2005-03-09 16:37:38.000000000 +0100 +@@ -130,15 +130,8 @@ + AC_PATH_PROG(ID, id, "", /usr/xpg4/bin:$PATH) + + dnl Check for Linux-specific kernel support for PPPoE +-AC_MSG_CHECKING(for Linux 2.4.X kernel-mode PPPoE support) +-if test "`uname -s`" = "Linux" ; then +-dnl Do a bunch of modprobes. Can't hurt; might help. +-modprobe ppp_generic > /dev/null 2>&1 +-modprobe ppp_async > /dev/null 2>&1 +-modprobe n_hdlc > /dev/null 2>&1 +-modprobe ppp_synctty > /dev/null 2>&1 +-modprobe pppoe > /dev/null 2>&1 +-AC_TRY_RUN([#include <sys/socket.h> ++AC_CACHE_CHECK([for Linux 2.4.X kernel-mode PPPoE support], ac_cv_linux_kernel_pppoe, ++[AC_TRY_RUN([#include <sys/socket.h> + #include <net/ethernet.h> + #include <linux/if.h> + #include <linux/if_pppox.h> +@@ -146,10 +139,7 @@ + { + if (socket(AF_PPPOX, SOCK_DGRAM, PX_PROTO_OE) >= 0) return 0; else return 1; + } +-], ac_cv_linux_kernel_pppoe=yes, ac_cv_linux_kernel_pppoe=no) +-else +- ac_cv_linux_kernel_pppoe=no +-fi ++], ac_cv_linux_kernel_pppoe=yes, ac_cv_linux_kernel_pppoe=no)]) + + $ECHO $ac_cv_linux_kernel_pppoe + if test "$ac_cv_linux_kernel_pppoe" != yes ; then +@@ -208,8 +198,8 @@ + esac + + dnl Figure out packing order of structures +-AC_MSG_CHECKING(packing order of bit fields) +-AC_TRY_RUN([ ++AC_CACHE_CHECK([packing order of bit fields], ac_cv_pack_bitfields_reversed, ++[AC_TRY_RUN([ + union foo { + struct bar { + unsigned int ver:4; +@@ -231,9 +221,9 @@ + } else { + return 2; + } +-}], PACK=normal, PACK=rev) ++}], ac_cv_pack_bitfields_reversed=no, ac_cv_pack_bitfields_reversed=yes)]) + +-if test "$PACK" = "rev" ; then ++if test "$ac_cv_pack_bitfields_reversed" = "yes" ; then + $ECHO "reversed" + AC_DEFINE(PACK_BITFIELDS_REVERSED) + else Added: trunk/package/rp-pppoe/rp-pppoe-3.5-scripts-fixes.patch =================================================================== --- trunk/package/rp-pppoe/rp-pppoe-3.5-scripts-fixes.patch (rev 0) +++ trunk/package/rp-pppoe/rp-pppoe-3.5-scripts-fixes.patch 2006-08-11 15:33:14 UTC (rev 230) @@ -0,0 +1,175 @@ +diff -ur rp-pppoe-3.5.orig/scripts/adsl-connect.in rp-pppoe-3.5/scripts/adsl-connect.in +--- rp-pppoe-3.5.orig/scripts/adsl-connect.in 2002-07-08 10:38:24.000000000 -0400 ++++ rp-pppoe-3.5/scripts/adsl-connect.in 2006-08-11 10:18:54.000000000 -0400 +@@ -18,7 +18,7 @@ + # Usage: adsl-connect [config_file] + # adsl-connect interface user [config_file] + # Second form overrides USER and ETH from config file. +-# If config_file is omitted, defaults to /etc//ppp/pppoe.conf ++# If config_file is omitted, defaults to /etc/ppp/pppoe.conf + # + #*********************************************************************** + +@@ -30,25 +30,22 @@ + # Paths to programs + IFCONFIG=/sbin/ifconfig + PPPD=@PPPD@ +-SETSID=@SETSID@ ++SETSID= + PPPOE=@sbindir@/pppoe + LOGGER="/usr/bin/logger -t `basename $0`" + ++MODPROBE=modprobe ++#MODPROBE=insmod ++ + # Set to "C" locale so we can parse messages from commands + LANG=C + export LANG + +-# Must be root +-if test "`@ID@ -u`" != 0 ; then +- echo "$0: You must be root to run this script" >& 2 +- exit 1 +-fi +- + if test "$SETSID" != "" -a ! -x "$SETSID"; then + SETSID="" + fi + +-CONFIG=/etc//ppp/pppoe.conf ++CONFIG=/etc/ppp/pppoe.conf + USER="" + ETH="" + +@@ -117,12 +114,12 @@ + if test `uname -s` = Linux ; then + $IFCONFIG $ETH up mtu 1500 + # For 2.4 kernels. Will fail on 2.2.x, but who cares? +- modprobe ppp_generic > /dev/null 2>&1 +- modprobe ppp_async > /dev/null 2>&1 +- modprobe ppp_synctty > /dev/null 2>&1 ++ $MODPROBE ppp_generic > /dev/null 2>&1 ++ $MODPROBE ppp_async > /dev/null 2>&1 ++ $MODPROBE ppp_synctty > /dev/null 2>&1 + if test -n "$LINUX_PLUGIN" ; then +- modprobe pppox > /dev/null 2>&1 +- modprobe pppoe > /dev/null 2>&1 ++ $MODPROBE pppox > /dev/null 2>&1 ++ $MODPROBE pppoe > /dev/null 2>&1 + fi + fi + +@@ -131,7 +128,7 @@ + PPPD_SYNC=sync + # Increase the chances of it working on Linux... + if test `uname -s` = Linux ; then +- modprobe n_hdlc > /dev/null 2>&1 ++ $MODPROBE n_hdlc > /dev/null 2>&1 + fi + else + PPPOE_SYNC="" +@@ -204,7 +201,7 @@ + + # Interface name MUST BE LAST!! + PLUGIN_OPTS="$PLUGIN_OPTS $ETH" +- modprobe pppoe > /dev/null 2>&1 ++ $MODPROBE pppoe > /dev/null 2>&1 + fi + + if test "$DEFAULTROUTE" != "no" ; then +diff -ur rp-pppoe-3.5.orig/scripts/adsl-setup.in rp-pppoe-3.5/scripts/adsl-setup.in +--- rp-pppoe-3.5.orig/scripts/adsl-setup.in 2002-07-08 10:38:24.000000000 -0400 ++++ rp-pppoe-3.5/scripts/adsl-setup.in 2006-08-11 10:19:25.000000000 -0400 +@@ -46,12 +46,6 @@ + $ECHO "properly..." + $ECHO "" + +-# Must be root +-if [ "`@ID@ -u`" != 0 ] ; then +- $ECHO "$0: Sorry, you must be root to run this script" +- exit 1 +-fi +- + # Prototype config file must exist + if [ ! -r "$CONFIG" ] ; then + $ECHO "Oh, dear, I don't see the file '$CONFIG' anywhere. Please" +@@ -280,12 +274,7 @@ + fi + fi + +-# Where is pppd likely to put its pid? +-if [ -d /var/run ] ; then +- VARRUN=/var/run +-else +- VARRUN=/etc/ppp +-fi ++VARRUN=/var/run + + # Some #$(*& ISP's use a slash in the user name... + sed -e "s&^USER=.*&USER='$U'&" \ +diff -ur rp-pppoe-3.5.orig/scripts/adsl-start.in rp-pppoe-3.5/scripts/adsl-start.in +--- rp-pppoe-3.5.orig/scripts/adsl-start.in 2002-07-08 10:38:24.000000000 -0400 ++++ rp-pppoe-3.5/scripts/adsl-start.in 2006-08-11 10:24:40.000000000 -0400 +@@ -40,11 +40,9 @@ + USER="" + ETH="" + ME=`basename $0` +-# Must be root +-if [ "`@ID@ -u`" != 0 ] ; then +- $ECHO "$ME: You must be root to run this script" >& 2 +- exit 1 +-fi ++ ++TTY_S="tty -s" ++#TTY_S=/bin/true + + # Debugging + if [ "$DEBUG" = "1" ] ; then +@@ -139,6 +137,8 @@ + fi + # Delete bogus PIDFILE + rm -f "$PIDFILE" "$PIDFILE.pppd" "$PIDFILE.pppoe" "$PIDFILE.start" ++else ++ mkdir -p /var/run + fi + + echo $$ > $PIDFILE.start +@@ -169,14 +169,14 @@ + # Looks like the interface came up + if [ $? = 0 ] ; then + # Print newline if standard input is a TTY +- tty -s && $ECHO " Connected!" ++ $TTY_S && $ECHO " Connected!" + exit 0 + fi + + if test -n "$FORCEPING" ; then + $ECHO -n "$FORCEPING" + else +- tty -s && $ECHO -n "$PING" ++ $TTY_S && $ECHO -n "$PING" + fi + sleep $CONNECT_POLL + TIME=`expr $TIME + $CONNECT_POLL` +diff -ur rp-pppoe-3.5.orig/scripts/adsl-status rp-pppoe-3.5/scripts/adsl-status +--- rp-pppoe-3.5.orig/scripts/adsl-status 2002-07-08 10:38:24.000000000 -0400 ++++ rp-pppoe-3.5/scripts/adsl-status 2006-08-11 10:20:32.000000000 -0400 +@@ -58,10 +58,7 @@ + + PPPD_PID=`cat "$PPPD_PIDFILE"` + +-# Sigh. Some versions of pppd put PID files in /var/run; others put them +-# in /etc/ppp. Since it's too messy to figure out what pppd does, we +-# try both locations. +-for i in /etc/ppp/ppp*.pid /var/run/ppp*.pid ; do ++for i in /var/run/ppp*.pid ; do + if [ -r $i ] ; then + PID=`cat $i` + if [ "$PID" = "$PPPD_PID" ] ; then +@@ -81,4 +78,4 @@ + + echo "adsl-status: Link is down -- could not find interface corresponding to" + echo "pppd pid $PPPD_PID" +-exit 1 +\ No newline at end of file ++exit 1 Added: trunk/package/rp-pppoe/rp-pppoe.mk =================================================================== --- trunk/package/rp-pppoe/rp-pppoe.mk (rev 0) +++ trunk/package/rp-pppoe/rp-pppoe.mk 2006-08-11 15:33:14 UTC (rev 230) @@ -0,0 +1,86 @@ +############################################################# +# +# rp-pppoe +# +############################################################# +# +RP-PPPOE_VERSION=3.5 +PPP_VERSION=2.4.3 +RP-PPPOE_SOURCE_URL=http://www.roaringpenguin.com/penguin/pppoe +RP-PPPOE_SOURCE=rp-pppoe-$(RP-PPPOE_VERSION).tar.gz +RP-PPPOE_BUILD_DIR=$(BUILD_DIR)/rp-pppoe-$(RP-PPPOE_VERSION) +RP-PPPOE_TARGET_BINARY:=usr/sbin/pppoe + +$(DL_DIR)/$(RP-PPPOE_SOURCE): + $(WGET) -P $(DL_DIR) $(RP-PPPOE_SOURCE_URL)/$(RP-PPPOE_SOURCE) + +$(RP-PPPOE_BUILD_DIR)/.unpacked: $(DL_DIR)/$(RP-PPPOE_SOURCE) + zcat $(DL_DIR)/$(RP-PPPOE_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) - + toolchain/patch-kernel.sh $(RP-PPPOE_BUILD_DIR) package/rp-pppoe/ rp-pppoe\*.patch + touch $(RP-PPPOE_BUILD_DIR)/.unpacked + +$(RP-PPPOE_BUILD_DIR)/.configured: $(RP-PPPOE_BUILD_DIR)/.unpacked + (cd $(RP-PPPOE_BUILD_DIR)/src ; rm -rf config.{cache,status}; \ + $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS)" \ + ac_cv_func_setvbuf_reversed=no \ + ac_cv_sizeof_unsigned_short=2 \ + ac_cv_sizeof_unsigned_int=4 \ + ac_cv_sizeof_unsigned_long=4 \ + ac_cv_linux_kernel_pppoe=yes \ + ac_cv_pack_bitfields_reversed=yes \ + ./configure \ + --target=$(GNU_TARGET_NAME) \ + --host=$(GNU_TARGET_NAME) \ + --build=$(GNU_HOST_NAME) \ + --program-prefix="" \ + --program-suffix="" \ + --prefix=/usr \ + --exec-prefix=/usr \ + --bindir=/usr/bin \ + --datadir=/usr/share \ + --includedir=/usr/include \ + --infodir=/usr/share/info \ + --libdir=/usr/lib \ + --libexecdir=/usr/lib \ + --localstatedir=/var \ + --mandir=/usr/share/man \ + --sbindir=/usr/sbin \ + --sysconfdir=/etc \ + --enable-plugin=$(BUILD_DIR)/ppp-$(PPP_VERSION) \ + $(DISABLE_NLS) \ + ); + + touch $(RP-PPPOE_BUILD_DIR)/.configured + +$(RP-PPPOE_BUILD_DIR)/src/pppoe: $(RP-PPPOE_BUILD_DIR)/.configured + $(MAKE) -C $(RP-PPPOE_BUILD_DIR)/src + +$(TARGET_DIR)/$(RP-PPPOE_TARGET_BINARY): $(RP-PPPOE_BUILD_DIR)/src/pppoe + $(INSTALL) -D -m 0755 $(RP-PPPOE_BUILD_DIR)/scripts/adsl-connect $(TARGET_DIR)/usr/sbin/adsl-connect + $(INSTALL) -D -m 0755 $(RP-PPPOE_BUILD_DIR)/scripts/adsl-start $(TARGET_DIR)/usr/sbin/adsl-start + $(INSTALL) -D -m 0755 $(RP-PPPOE_BUILD_DIR)/scripts/adsl-stop $(TARGET_DIR)/usr/sbin/adsl-stop + $(INSTALL) -D -m 0755 $(RP-PPPOE_BUILD_DIR)/scripts/adsl-status $(TARGET_DIR)/usr/sbin/adsl-status + $(INSTALL) -D -m 0755 $(RP-PPPOE_BUILD_DIR)/src/pppoe-server $(TARGET_DIR)/usr/sbin/pppoe-server + $(INSTALL) -D -m 0755 $(RP-PPPOE_BUILD_DIR)/src/pppoe-sniff $(TARGET_DIR)/usr/sbin/pppoe-sniff + $(INSTALL) -D -m 0755 $(RP-PPPOE_BUILD_DIR)/src/pppoe-relay $(TARGET_DIR)/usr/sbin/pppoe-relay + $(INSTALL) -D -m 0755 $(RP-PPPOE_BUILD_DIR)/src/rp-pppoe.so $(TARGET_DIR)/usr/lib/ppp/rp-pppoe.so + $(INSTALL) -D -m 0755 $(RP-PPPOE_BUILD_DIR)/src/pppoe $(TARGET_DIR)/usr/sbin/pppoe + +rp-pppoe: uclibc pppd $(TARGET_DIR)/$(RP-PPPOE_TARGET_BINARY) + +rp-pppoe-source: $(DL_DIR)/$(RP-PPPOE_SOURCE) + +rp-pppoe-clean: + -$(MAKE) -C $(RP-PPPOE_BUILD_DIR) clean + +rp-pppoe-dirclean: + rm -rf $(RP-PPPOE_BUILD_DIR) +############################################################# +# +# Toplevel Makefile options +# +############################################################# +ifeq ($(strip $(BR2_PACKAGE_RP-PPPOE)),y) +TARGETS+=rp-pppoe +endif Deleted: trunk/target/generic/target_skeleton/usr/sbin/adsl-connect =================================================================== --- trunk/target/generic/target_skeleton/usr/sbin/adsl-connect 2006-08-11 15:31:17 UTC (rev 229) +++ trunk/target/generic/target_skeleton/usr/sbin/adsl-connect 2006-08-11 15:33:14 UTC (rev 230) @@ -1,322 +0,0 @@ -#!/bin/sh -# Generated automatically from adsl-connect.in by configure. -#*********************************************************************** -# -# adsl-connect -# -# Shell script to connect to an ADSL provider using PPPoE -# -# Copyright (C) 2000 Roaring Penguin Software Inc. -# -# $Id: adsl-connect.in,v 1.23 2002/04/09 17:28:39 dfs Exp $ -# -# This file may be distributed under the terms of the GNU General -# Public License. -# -# LIC: GPL -# -# Usage: adsl-connect [config_file] -# adsl-connect interface user [config_file] -# Second form overrides USER and ETH from config file. -# If config_file is omitted, defaults to /etc//ppp/pppoe.conf -# -#*********************************************************************** - -# From AUTOCONF -prefix=/usr -exec_prefix=${prefix} -localstatedir=/var - -# Paths to programs -IFCONFIG=/sbin/ifconfig -PPPD=/usr/sbin/pppd -SETSID=/usr/bin/setsid -PPPOE=${exec_prefix}/sbin/pppoe -LOGGER="/usr/bin/logger -t `basename $0`" - -# Set to "C" locale so we can parse messages from commands -LANG=C -export LANG - -# Must be root -if test "`/usr/bin/id -u`" != 0 ; then - echo "$0: You must be root to run this script" >& 2 - exit 1 -fi - -if test "$SETSID" != "" -a ! -x "$SETSID"; then - SETSID="" -fi - -CONFIG=/etc//ppp/pppoe.conf -USER="" -ETH="" - -# Sort out command-line arguments -case "$#" in - 1) - CONFIG="$1" - ;; - 3) - CONFIG="$3" - ;; -esac - -if test ! -f "$CONFIG" -o ! -r "$CONFIG" ; then - echo "$0: Cannot read configuration file '$CONFIG'" >& 2 - exit 1 -fi - -. $CONFIG - -PPPOE_PIDFILE="$PIDFILE.pppoe" -PPPD_PIDFILE="$PIDFILE.pppd" - -# Check for command-line overriding of ETH and USER -case "$#" in - 2|3) - ETH="$1" - USER="$2" - ;; -esac - -# Check that config file is sane -if test "$USER" = "" ; then - echo "$0: Check '$CONFIG' -- no setting for USER" >& 2 - exit 1 -fi -if test "$ETH" = "" ; then - echo "$0: Check '$CONFIG' -- no setting for ETH" >& 2 - exit 1 -fi - -PPPD_PID=0 - -# Catch common error -if test "$DEBUG" = "1" ; then - echo "*** If you want to use DEBUG, invoke adsl-start, not adsl-connect." - exit 1 -fi - -if test "$DEBUG" != "" ; then - if test "$LINUX_PLUGIN" != "" ; then - echo "Cannot use DEBUG mode and LINUX_PLUGIN at the same time." - echo "Kernel-mode PPPoE is experimental and unsupported." - exit 1 - fi - echo "* The following section identifies your Ethernet interface" >> $DEBUG - echo "* and user name. Some ISP's need 'username'; others" >> $DEBUG - echo "* need 'use...@is...'. Try both" >> $DEBUG - echo "ETH=$ETH; USER=$USER" >> $DEBUG - echo "---------------------------------------------" >> $DEBUG -fi - -# MTU of Ethernet card attached to modem MUST be 1500. This apparently -# fails on some *BSD's, so we'll only do it under Linux - -if test `uname -s` = Linux ; then - $IFCONFIG $ETH up mtu 1500 - # For 2.4 kernels. Will fail on 2.2.x, but who cares? - modprobe ppp_generic > /dev/null 2>&1 - modprobe ppp_async > /dev/null 2>&1 - modprobe ppp_synctty > /dev/null 2>&1 - if test -n "$LINUX_PLUGIN" ; then - modprobe pppox > /dev/null 2>&1 - modprobe pppoe > /dev/null 2>&1 - fi -fi - -if test "$SYNCHRONOUS" = "yes" ; then - PPPOE_SYNC=-s - PPPD_SYNC=sync - # Increase the chances of it working on Linux... - if test `uname -s` = Linux ; then - modprobe n_hdlc > /dev/null 2>&1 - fi -else - PPPOE_SYNC="" - PPPD_SYNC="" -fi - -if test -n "$ACNAME" ; then - ACNAME="-C $ACNAME" -fi - -if test -n "$SERVICENAME" ; then - SERVICENAMEOPT="-S $SERVICENAME" -else - SERVICENAMEOPT="" -fi - -if test "$CLAMPMSS" = "no" ; then - CLAMPMSS="" -else - CLAMPMSS="-m $CLAMPMSS" -fi - -# If DNSTYPE is SERVER, we must use "usepeerdns" option to pppd. -if test "$DNSTYPE" = "SERVER" ; then - PEERDNS=yes - USEPEERDNS=yes -fi - -if test "$PEERDNS" = "yes" ; then - PEERDNS="usepeerdns" -else - PEERDNS="" -fi - -# Backward config file compatibility -- PEERDNS used to be USEPEERDNS -if test "$USEPEERDNS" = "yes" ; then - PEERDNS="usepeerdns" -fi -if test "$USEPEERDNS" = "no" ; then - PEERDNS="" -fi - - -# Backward config file compatibility -if test "$DEMAND" = "" ; then - DEMAND=no -fi - -if test "$DEMAND" = "no" ; then - DEMAND="" -else - DEMAND="demand persist idle $DEMAND 10.112.112.112:10.112.112.113 ipcp-accept-remote ipcp-accept-local connect true noipdefault ktune" -fi - -case "$FIREWALL" in - STANDALONE) - . /etc/ppp/firewall-standalone - ;; - MASQUERADE) - . /etc/ppp/firewall-masq - ;; -esac - -# If we're using kernel-mode PPPoE on Linux... -if test "$LINUX_PLUGIN" != "" ; then - PLUGIN_OPTS="plugin $LINUX_PLUGIN" - if test -n "$SERVICENAME" ; then - PLUGIN_OPTS="$PLUGIN_OPTS rp_pppoe_service $SERVICENAME" - fi - - # Interface name MUST BE LAST!! - PLUGIN_OPTS="$PLUGIN_OPTS nic-$ETH" - modprobe pppoe > /dev/null 2>&1 -fi - -if test "$DEFAULTROUTE" != "no" ; then - DEFAULTROUTE="defaultroute" -else - DEFAULTROUTE="" -fi - -# Standard PPP options we always use -PPP_STD_OPTIONS="$PLUGIN_OPTS noipdefault noauth default-asyncmap $DEFAULTROUTE hide-password nodetach $PEERDNS mtu 1492 mru 1492 noaccomp noccp nobsdcomp nodeflate nopcomp novj novjccomp user $USER lcp-echo-interval $LCP_INTERVAL lcp-echo-failure $LCP_FAILURE $PPPD_EXTRA" - -# Jigger DNS if required... -if test "$DNSTYPE" = "SERVER" ; then - # Sorry, dude... - rm -f /tmp/etc/resolv.conf - ln -s /etc/ppp/resolv.conf /tmp/etc/resolv.conf -elif test "$DNSTYPE" = "SPECIFY" ; then - # Sorry, dude... - rm -f /tmp/etc/resolv.conf - echo "nameserver $DNS1" > /tmp/etc/resolv.conf - if test -n "$DNS2" ; then - echo "nameserver $DNS2" >> /tmp/etc/resolv.conf - fi -fi - -# PPPoE invocation -PPPOE_CMD="$PPPOE -p $PPPOE_PIDFILE -I $ETH -T $PPPOE_TIMEOUT -U $PPPOE_SYNC $CLAMPMSS $ACNAME $SERVICENAMEOPT $PPPOE_EXTRA" -if test "$DEBUG" != "" ; then - if test "$DEMAND" != "" ; then - echo "(Turning off DEMAND for debugging purposes)" - DEMAND="" - fi - echo "* The following section shows the pppd command we will invoke" >> $DEBUG - echo "pppd invocation" >> $DEBUG - echo "$SETSID $PPPD pty '$PPPOE_CMD' $PPP_STD_OPTIONS $PPPD_SYNC debug" >> $DEBUG - echo "---------------------------------------------" >> $DEBUG - $SETSID $PPPD pty "$PPPOE_CMD -D $DEBUG-0" \ - $PPP_STD_OPTIONS \ - $PPPD_SYNC \ - debug >> $DEBUG 2>&1 - echo "---------------------------------------------" >> $DEBUG - echo "* The following section is an extract from your log." >> $DEBUG - echo "* Look for error messages from pppd, such as" >> $DEBUG - echo "* a lack of kernel support for PPP, authentication failure" >> $DEBUG - echo "* etc." >> $DEBUG - if test -f "/var/log/messages" ; then - echo "Extract from /var/log/messages" >> $DEBUG - grep 'ppp' /var/log/messages | tail -150 >> $DEBUG - elif test -f "/var/adm/messages"; then - echo "Extract from /var/adm/messages" >> $DEBUG - grep 'ppp' /var/adm/messages | tail -150 >> $DEBUG - else - echo "Can't find messages file (looked for /var/{log,adm}/messages" >> $DEBUG - fi - date >> $DEBUG - echo "---------------------------------------------" >> $DEBUG - echo "* The following section is a dump of the packets" >> $DEBUG - echo "* sent and received by rp-pppoe. If you don't see" >> $DEBUG - echo "* any output, it's an Ethernet driver problem. If you only" >> $DEBUG - echo "* see three PADI packets and nothing else, check your cables" >> $DEBUG - echo "* and modem. Make sure the modem lights flash when you try" >> $DEBUG - echo "* to connect. Check that your Ethernet card is in" >> $DEBUG - echo "* half-duplex, 10Mb/s mode. If all else fails," >> $DEBUG - echo "* try using pppoe-sniff." >> $DEBUG - echo "rp-pppoe debugging dump" >> $DEBUG - cat $DEBUG-0 >> $DEBUG - rm -f $DEBUG-0 - for i in 1 2 3 4 5 6 7 8 9 10 ; do - echo "" - echo "" - echo "" - done - echo "*** Finished debugging run. Please review the file" - echo "*** '$DEBUG' and try to" - echo "*** figure out what is going on." - echo "***" - echo "*** Unfortunately, we can NO LONGER accept debugging" - echo "*** output for analysis. Please do not send this to" - echo "*** Roaring Penguin; it is too time-consuming for" - echo "*** us to deal with all the analyses we have been sent." - exit 0 -fi - -echo $$ > $PIDFILE - -while [ true ] ; do - if test "$OVERRIDE_PPPD_COMMAND" != "" ; then - $SETSID $OVERRIDE_PPPD_COMMAND & - echo "$!" > $PPPD_PIDFILE - elif test "$LINUX_PLUGIN" != "" ; then - $SETSID $PPPD $PPP_STD_OPTIONS $DEMAND & - echo "$!" > $PPPD_PIDFILE - else - $SETSID $PPPD pty "$PPPOE_CMD" \ - $PPP_STD_OPTIONS \ - $DEMAND \ - $PPPD_SYNC & - echo "$!" > $PPPD_PIDFILE - fi - wait - - if test "$RETRY_ON_FAILURE" = "no" ; then - exit - fi - - # Run /etc/ppp/adsl-lost if it exists - test -x /etc/ppp/adsl-lost && /etc/ppp/adsl-lost - - # Re-establish the connection - $LOGGER -p daemon.notice \ - "ADSL connection lost; attempting re-connection." - - # Wait a bit in case a problem causes tons of log messages :-) - sleep 5 -done Deleted: trunk/target/generic/target_skeleton/usr/sbin/adsl-start =================================================================== --- trunk/target/generic/target_skeleton/usr/sbin/adsl-start 2006-08-11 15:31:17 UTC (rev 229) +++ trunk/target/generic/target_skeleton/usr/sbin/adsl-start 2006-08-11 15:33:14 UTC (rev 230) @@ -1,196 +0,0 @@ -#!/bin/sh -# Generated automatically from adsl-start.in by configure. -#*********************************************************************** -# -# adsl-start -# -# Shell script to bring up an ADSL connection -# -# Copyright (C) 2000 Roaring Penguin Software Inc. -# -# $Id: adsl-start.in,v 1.8 2002/04/09 17:28:39 dfs Exp $ -# -# This file may be distributed under the terms of the GNU General -# Public License. -# -# LIC: GPL -# -# Usage: adsl-start [config_file] -# adsl-start interface user [config_file] -# Second form overrides USER and ETH from config file. -# If config_file is omitted, defaults to /etc/ppp/pppoe.conf -# -#*********************************************************************** - -# From AUTOCONF -prefix=/usr -exec_prefix=${prefix} - -# Paths to programs -CONNECT=${exec_prefix}/sbin/adsl-connect -ECHO=/bin/echo -IFCONFIG=/sbin/ifconfig - -# Set to "C" locale so we can parse messages from commands -LANG=C -export LANG - -# Defaults -CONFIG=/etc/ppp/pppoe.conf -USER="" -ETH="" -ME=`basename $0` -# Must be root -if [ "`/usr/bin/id -u`" != 0 ] ; then - $ECHO "$ME: You must be root to run this script" >& 2 - exit 1 -fi - -# Debugging -if [ "$DEBUG" = "1" ] ; then - $ECHO "*** Running in debug mode... please be patient..." - DEBUG=/tmp/pppoe-debug-$$ - export DEBUG - mkdir $DEBUG - if [ "$?" != 0 ] ; then - $ECHO "Could not create directory $DEBUG... exiting" - exit 1 - fi - DEBUG=$DEBUG/pppoe-debug.txt - - # Initial debug output - $ECHO "---------------------------------------------" > $DEBUG - $ECHO "* The following section contains information about your system" >> $DEBUG - date >> $DEBUG - $ECHO "Output of uname -a" >> $DEBUG - uname -a >> $DEBUG - $ECHO "---------------------------------------------" >> $DEBUG - $ECHO "* The following section contains information about your network" >> $DEBUG - $ECHO "* interfaces. The one you chose for PPPoE should contain the words:" >> $DEBUG - $ECHO "* 'UP' and 'RUNNING'. If it does not, you probably have an Ethernet" >> $DEBUG - $ECHO "* driver problem." >> $DEBUG - $ECHO "Output of ifconfig -a" >> $DEBUG - $IFCONFIG -a >> $DEBUG - $ECHO "---------------------------------------------" >> $DEBUG - if [ "`uname -s`" = "Linux" ] ; then - $ECHO "* The following section contains information about kernel modules" >> $DEBUG - $ECHO "* If the module for your Ethernet card is 'tulip', you might" >> $DEBUG - $ECHO "* want to look for an updated version at http://www.scyld.com" >> $DEBUG - $ECHO "Output of lsmod" >> $DEBUG - lsmod >> $DEBUG - $ECHO "---------------------------------------------" >> $DEBUG - fi - $ECHO "* The following section lists your routing table." >> $DEBUG - $ECHO "* If you have an entry which starts with '0.0.0.0', you probably" >> $DEBUG - $ECHO "* have defined a default route and gateway, and pppd will" >> $DEBUG - $ECHO "* not create a default route using your ISP. Try getting" >> $DEBUG - $ECHO "* rid of this route." >> $DEBUG - $ECHO "Output of netstat -n -r" >> $DEBUG - netstat -n -r >> $DEBUG - $ECHO "---------------------------------------------" >> $DEBUG - $ECHO "Contents of /etc/resolv.conf" >> $DEBUG - $ECHO "* The following section lists DNS setup." >> $DEBUG - $ECHO "* If you can browse by IP address, but not name, suspect" >> $DEBUG - $ECHO "* a DNS problem." >> $DEBUG - cat /etc/resolv.conf >> $DEBUG - $ECHO "---------------------------------------------" >> $DEBUG - $ECHO "* The following section lists /etc/ppp/options." >> $DEBUG - $ECHO "* You should have NOTHING in that file." >> $DEBUG - $ECHO "Contents of /etc/ppp/options" >> $DEBUG - cat /etc/ppp/options >> $DEBUG 2>/dev/null - $ECHO "---------------------------------------------" >> $DEBUG -else - DEBUG="" -fi - -# Sort out command-line arguments -case "$#" in - 1) - CONFIG="$1" - ;; - 3) - CONFIG="$3" - ;; -esac - -if [ ! -f "$CONFIG" -o ! -r "$CONFIG" ] ; then - $ECHO "$ME: Cannot read configuration file '$CONFIG'" >& 2 - exit 1 -fi - -. $CONFIG - -# Check for command-line overriding of ETH and USER -case "$#" in - 2|3) - ETH="$1" - USER="$2" - ;; -esac - -# Check for pidfile -if [ -r "$PIDFILE" ] ; then - PID=`cat "$PIDFILE"` - # Check if still running - kill -0 $PID > /dev/null 2>&1 - if [ $? = 0 ] ; then - $ECHO "$ME: There already seems to be an ADSL connection up (PID $PID)" >& 2 - exit 1 - fi - # Delete bogus PIDFILE - rm -f "$PIDFILE" "$PIDFILE.pppd" "$PIDFILE.pppoe" "$PIDFILE.start" -fi - -echo $$ > $PIDFILE.start - -# Start the connection in the background unless we're debugging -if [ "$DEBUG" != "" ] ; then - $CONNECT "$@" - exit 0 -fi - -$CONNECT "$@" > /dev/null 2>&1 & -CONNECT_PID=$! - -if [ "$CONNECT_TIMEOUT" = "" -o "$CONNECT_TIMEOUT" = 0 ] ; then - exit 0 -fi - -# Don't monitor connection if dial-on-demand -if [ "$DEMAND" != "" -a "$DEMAND" != "no" ] ; then - exit 0 -fi - -# Monitor connection -TIME=0 -while [ true ] ; do - ${exec_prefix}/sbin/adsl-status $CONFIG > /dev/null 2>&1 - - # Looks like the interface came up - if [ $? = 0 ] ; then - # Print newline if standard input is a TTY - tty -s && $ECHO " Connected!" - exit 0 - fi - - if test -n "$FORCEPING" ; then - $ECHO -n "$FORCEPING" - else - tty -s && $ECHO -n "$PING" - fi - sleep $CONNECT_POLL - TIME=`expr $TIME + $CONNECT_POLL` - if [ $TIME -gt $CONNECT_TIMEOUT ] ; then - break - fi -done - -$ECHO "TIMED OUT" >& 2 -# Timed out! Kill the adsl-connect process and quit -kill $CONNECT_PID > /dev/null 2>&1 - -# Clean up PIDFILE(s) -rm -f "$PIDFILE" "$PIDFILE.pppd" "$PIDFILE.pppoe" "$PIDFILE.start" - -exit 1 - Deleted: trunk/target/generic/target_skeleton/usr/sbin/adsl-status =================================================================== --- trunk/target/generic/target_skeleton/usr/sbin/adsl-status 2006-08-11 15:31:17 UTC (rev 229) +++ trunk/target/generic/target_skeleton/usr/sbin/adsl-status 2006-08-11 15:33:14 UTC (rev 230) @@ -1,84 +0,0 @@ -#!/bin/sh -#*********************************************************************** -# -# adsl-status -# -# Shell script to report on status of ADSL connection -# -# Copyright (C) 2000-2001 Roaring Penguin Software Inc. -# -# $Id: adsl-status,v 1.3 2002/04/09 17:28:39 dfs Exp $ -# -# This file may be distributed under the terms of the GNU General -# Public License. -# -# LIC: GPL -# -# Usage: adsl-status [config_file] -# If config_file is omitted, defaults to /etc/ppp/pppoe.conf -# -#*********************************************************************** - -# Defaults -CONFIG=/etc/ppp/pppoe.conf - -case "$#" in - 1) - CONFIG="$1" - ;; -esac - -if [ ! -f "$CONFIG" -o ! -r "$CONFIG" ] ; then - echo "$0: Cannot read configuration file '$CONFIG'" >& 2 - exit 1 -fi - -. $CONFIG - -PPPOE_PIDFILE="$PIDFILE.pppoe" -PPPD_PIDFILE="$PIDFILE.pppd" - -if [ "$DEMAND" != "no" ] ; then - echo "Note: You have enabled demand-connection; adsl-status may be inaccurate." -fi - -# If no PPPOE_PIDFILE, connection is down, unless we're using the Linux plugin -if [ "$LINUX_PLUGIN" = "" ] ; then - if [ ! -r "$PPPOE_PIDFILE" ] ; then - echo "adsl-status: Link is down (can't read pppoe PID file $PPPOE_PIDFILE)" - exit 1 - fi -fi - -# If no PPPD_PIDFILE, something fishy! -if [ ! -r "$PPPD_PIDFILE" ] ; then - echo "adsl-status: Link is down (can't read pppd PID file $PPPD_PIDFILE)" - exit 1 -fi - -PPPD_PID=`cat "$PPPD_PIDFILE"` - -# Sigh. Some versions of pppd put PID files in /var/run; others put them -# in /etc/ppp. Since it's too messy to figure out what pppd does, we -# try both locations. -for i in /etc/ppp/ppp*.pid /var/run/ppp*.pid ; do - if [ -r $i ] ; then - PID=`cat $i` - if [ "$PID" = "$PPPD_PID" ] ; then - IF=`basename $i .pid` - netstat -rn | grep " ${IF}\$" > /dev/null - # /sbin/ifconfig $IF | grep "UP.*POINTOPOINT" > /dev/null - if [ "$?" != "0" ] ; then - echo "adsl-status: Link is attached to $IF, but $IF is down" - exit 1 - fi - echo "adsl-status: Link is up and running on interface $IF" - /sbin/ifconfig $IF - exit 0 - fi - fi -done - -echo "adsl-status: Link is down -- could not find interface corresponding to" -echo "pppd pid $PPPD_PID" -exit 1 \ No newline at end of file Deleted: trunk/target/generic/target_skeleton/usr/sbin/adsl-stop =================================================================== --- trunk/target/generic/target_skeleton/usr/sbin/adsl-stop 2006-08-11 15:31:17 UTC (rev 229) +++ trunk/target/generic/target_skeleton/usr/sbin/adsl-stop 2006-08-11 15:33:14 UTC (rev 230) @@ -1,90 +0,0 @@ -#!/bin/sh -# Generated automatically from adsl-stop.in by configure. -#*********************************************************************** -# -# adsl-stop -# -# Shell script to bring down an ADSL connection -# -# Copyright (C) 2000 Roaring Penguin Software Inc. -# -# $Id: adsl-stop.in,v 1.5 2002/04/09 17:28:39 dfs Exp $ -# -# This file may be distributed under the terms of the GNU General -# Public License. -# -# LIC: GPL -# -# Usage: adsl-stop [config_file] -# If config_file is omitted, defaults to /etc/ppp/pppoe.conf -# -#*********************************************************************** - -# Set to "C" locale so we can parse messages from commands -LANG=C -export LANG - -ME="`basename $0`" -LOGGER="/usr/bin/logger -t $ME" -CONFIG="$1" -if [ "$CONFIG" = "" ] ; then - CONFIG=/etc/ppp/pppoe.conf -fi - -if [ ! -f "$CONFIG" -o ! -r "$CONFIG" ] ; then - echo "$ME: Cannot read configuration file '$CONFIG'" >& 2 - exit 1 -fi - -. $CONFIG - -PPPOE_PIDFILE="$PIDFILE.pppoe" -PPPD_PIDFILE="$PIDFILE.pppd" -STARTPID="$PIDFILE.start" - -# Backward config file compatibility -if test "$DEMAND" = "" ; then - DEMAND=no -fi - -# Ignore SIGTERM -trap "" 15 - -# Check for pidfile -if [ -r "$PIDFILE" ] ; then - PID=`cat $PIDFILE` - - # Check if still running - kill -0 $PID > /dev/null 2>&1 - if [ $? != 0 ] ; then - echo "$ME: The adsl-connect script (PID $PID) appears to have died" >& 2 - fi - - # Kill pppd, which should in turn kill pppoe - if [ -r "$PPPD_PIDFILE" ] ; then - PPPD_PID=`cat "$PPPD_PIDFILE"` - $LOGGER -p daemon.notice "Killing pppd" - echo "Killing pppd ($PPPD_PID)" - kill $PPPD_PID > /dev/null 2>&1 || exit 1 - fi - - # Kill adsl-start - PIDS=`cat $STARTPID` - kill -0 $PIDS > /dev/null 2>&1 - if [ $? = 0 ] ; then - $LOGGER -p daemon.notice "Killing adsl-connect" - kill $PIDS > /dev/null 2>&1 - fi - - # Kill adsl-connect - $LOGGER -p daemon.notice "Killing adsl-connect" - echo "Killing adsl-connect ($PID)" - kill $PID > /dev/null 2>&1 - - rm -f "$PIDFILE" "$PPPD_PIDFILE" "$PPPOE_PIDFILE" "$STARTPID" -else - echo "$ME: No ADSL connection appears to be running" >&2 - exit 1 -fi - -exit 0 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |