Add rp-pppoe package

SVN-Revision: 1413
owl
Nicolas Thill 2005-07-11 21:17:45 +00:00
parent d79a950285
commit 4905ec691b
21 changed files with 1095 additions and 0 deletions

View File

@ -70,6 +70,7 @@ source "package/openvpn/Config.in"
source "package/pmacct/Config.in"
source "package/portmap/Config.in"
source "package/ppp/Config.in"
source "package/rp-pppoe/Config.in"
source "package/pptp/Config.in"
source "package/pptpd/Config.in"
source "package/quagga/Config.in"

View File

@ -102,6 +102,7 @@ package-$(BR2_PACKAGE_QUAGGA) += quagga
package-$(BR2_PACKAGE_RADVD) += radvd
package-$(BR2_PACKAGE_READLINE) += readline
package-$(BR2_PACKAGE_ROBOCFG) += robocfg
package-$(BR2_PACKAGE_RP_PPPOE) += rp-pppoe
package-$(BR2_PACKAGE_RSYNC) += rsync
package-$(BR2_PACKAGE_SABLEVM) += sablevm
package-$(BR2_PACKAGE_SABLEVM_CLASSPATH) += sablevm-classpath

View File

@ -0,0 +1,54 @@
menu "pppoe - Roaring Penguin PPPoE (PPP over Ethernet) implementation"
config BR2_PACKAGE_RP_PPPOE
bool
default n
depends BR2_PACKAGE_PPPOE_CLIENT || BR2_PACKAGE_PPPOE_RELAY || BR2_PACKAGE_PPPOE_SERVER || BR2_PACKAGE_PPPOE_SNIFF
config BR2_PACKAGE_PPPOE_CLIENT
tristate
prompt "pppoe-client - PPPoE (PPP over Ethernet) client"
# default m if DEVELOPER
select BR2_PACKAGE_RP_PPPOE
select BR2_PACKAGE_PPP
help
PPPoE (PPP over Ethernet) client
http://roaringpenguin.com/penguin/open_source_rp-pppoe.php
config BR2_PACKAGE_PPPOE_RELAY
tristate
prompt "pppoe-relay - PPPoE (PPP over Ethernet) relay"
# default m if DEVELOPER
select BR2_PACKAGE_RP_PPPOE
help
PPPoE (PPP over Ethernet) relay
http://roaringpenguin.com/penguin/open_source_rp-pppoe.php
config BR2_PACKAGE_PPPOE_SERVER
tristate
prompt "pppoe-server - PPPoE (PPP over Ethernet) server"
# default m if DEVELOPER
select BR2_PACKAGE_RP_PPPOE
select BR2_PACKAGE_PPP
help
PPPoE (PPP over Ethernet) server
http://roaringpenguin.com/penguin/open_source_rp-pppoe.php
config BR2_PACKAGE_PPPOE_SNIFF
tristate
prompt "pppoe-sniff - PPPoE (PPP over Ethernet) frame sniffer"
# default m if DEVELOPER
select BR2_PACKAGE_RP_PPPOE
help
PPPoE (PPP over Ethernet) frame sniffer
http://roaringpenguin.com/penguin/open_source_rp-pppoe.php
endmenu

View File

@ -0,0 +1,101 @@
# $Id$
include $(TOPDIR)/rules.mk
PKG_NAME:=rp-pppoe
PKG_VERSION:=3.5
PKG_RELEASE:=1
PKG_MD5SUM:=
PKG_SOURCE_URL:=http://roaringpenguin.com/penguin/pppoe/
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_CAT:=zcat
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
include $(TOPDIR)/package/rules.mk
$(eval $(call PKG_template,PPPOE_CLIENT,pppoe-client,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
$(eval $(call PKG_template,PPPOE_RELAY,pppoe-relay,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
$(eval $(call PKG_template,PPPOE_SERVER,pppoe-server,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
$(eval $(call PKG_template,PPPOE_SNIFF,pppoe-sniff,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
$(PKG_BUILD_DIR)/.configured:
(cd $(PKG_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 \
$(DISABLE_LARGEFILE) \
$(DISABLE_NLS) \
)
touch $@
$(PKG_BUILD_DIR)/.built:
$(MAKE) -C $(PKG_BUILD_DIR)/src \
DESTDIR="$(PKG_INSTALL_DIR)" \
all install
touch $@
$(IPKG_PPPOE_CLIENT):
install -d -m0755 $(IDIR_PPPOE_CLIENT)/etc/init.d
install -m0755 ./files/pppoe-client.init $(IDIR_PPPOE_CLIENT)/etc/init.d/pppoe-client
install -d -m0755 $(IDIR_PPPOE_CLIENT)/etc/ppp
install -m0644 $(PKG_INSTALL_DIR)/etc/pppoe.conf $(IDIR_PPPOE_CLIENT)/etc/
install -d -m0755 $(IDIR_PPPOE_CLIENT)/usr/sbin
cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/pppoe $(IDIR_PPPOE_CLIENT)/usr/sbin/
cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/adsl-* $(IDIR_PPPOE_CLIENT)/usr/sbin/
$(RSTRIP) $(IDIR_PPPOE_CLIENT)
$(IPKG_BUILD) $(IDIR_PPPOE_CLIENT) $(PACKAGE_DIR)
$(IPKG_PPPOE_RELAY):
install -d -m0755 $(IDIR_PPPOE_RELAY)/etc/default
install -m0755 ./files/pppoe-relay.default $(IDIR_PPPOE_RELAY)/etc/default/pppoe-relay
install -d -m0755 $(IDIR_PPPOE_RELAY)/etc/init.d
install -m0755 ./files/pppoe-relay.init $(IDIR_PPPOE_RELAY)/etc/init.d/pppoe-relay
install -d -m0755 $(IDIR_PPPOE_RELAY)/usr/sbin
cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/pppoe-relay $(IDIR_PPPOE_RELAY)/usr/sbin/
$(RSTRIP) $(IDIR_PPPOE_RELAY)
$(IPKG_BUILD) $(IDIR_PPPOE_RELAY) $(PACKAGE_DIR)
$(IPKG_PPPOE_SERVER):
install -d -m0755 $(IDIR_PPPOE_SERVER)/etc/default
install -m0755 ./files/pppoe-server.default $(IDIR_PPPOE_SERVER)/etc/default/pppoe-server
install -d -m0755 $(IDIR_PPPOE_SERVER)/etc/init.d
install -m0755 ./files/pppoe-server.init $(IDIR_PPPOE_SERVER)/etc/init.d/pppoe-server
install -d -m0755 $(IDIR_PPPOE_SERVER)/etc/ppp
install -m0644 $(PKG_INSTALL_DIR)/etc/ppp/pppoe-server-options $(IDIR_PPPOE_SERVER)/etc/ppp/
install -d -m0755 $(IDIR_PPPOE_SERVER)/usr/sbin
cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/pppoe-server $(IDIR_PPPOE_SERVER)/usr/sbin/
$(RSTRIP) $(IDIR_PPPOE_SERVER)
$(IPKG_BUILD) $(IDIR_PPPOE_SERVER) $(PACKAGE_DIR)
$(IPKG_PPPOE_SNIFF):
install -d -m0755 $(IDIR_PPPOE_SNIFF)/usr/sbin
cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/pppoe-sniff $(IDIR_PPPOE_SNIFF)/usr/sbin/
$(RSTRIP) $(IDIR_PPPOE_SNIFF)
$(IPKG_BUILD) $(IDIR_PPPOE_SNIFF) $(PACKAGE_DIR)

View File

@ -0,0 +1,12 @@
#!/bin/sh
case "$1" in
start|stop)
adsl-$1
;;
*)
echo "usage: $0 {start|stop}"
exit 1
esac
exit $?

View File

@ -0,0 +1 @@
OPTIONS="-C eth2 -S vlan1"

View File

@ -0,0 +1,15 @@
#!/bin/sh
DEFAULT=/etc/default/pppoe-relay
[ -f $DEFAULT ] && . $DEFAULT
case $1 in
start)
pppoe-relay $OPTIONS
;;
*)
echo "usage: $0 (start)"
exit 1
esac
exit $?

View File

@ -0,0 +1 @@
OPTIONS="-C MyRouter -I eth2"

View File

@ -0,0 +1,15 @@
#!/bin/sh
DEFAULT=/etc/default/pppoe-server
[ -f $DEFAULT ] && . $DEFAULT
case $1 in
start)
pppoe-server $OPTIONS
;;
*)
echo "usage: $0 (start)"
exit 1
esac
exit $?

View File

@ -0,0 +1 @@
/etc/pppoe.conf

View File

@ -0,0 +1,9 @@
Package: pppoe-client
Priority: optional
Section: net
Version: [TBDL]
Architecture: [TBDL]
Maintainer: OpenWrt Developers Team <bugs@openwrt.org>
Source: http://openwrt.org/cgi-bin/viewcvs.cgi/openwrt/package/rp-pppoe/
Description: PPPoE (PPP over Ethernet) client
Depends: ppp

View File

@ -0,0 +1 @@
/etc/default/pppoe-relay

View File

@ -0,0 +1,8 @@
Package: pppoe-relay
Priority: optional
Section: net
Version: [TBDL]
Architecture: [TBDL]
Maintainer: OpenWrt Developers Team <bugs@openwrt.org>
Source: http://openwrt.org/cgi-bin/viewcvs.cgi/openwrt/package/rp-pppoe/
Description: PPPoE (PPP over Ethernet) relay

View File

@ -0,0 +1,2 @@
/etc/default/pppoe-server
/etc/ppp/pppoe-server-options

View File

@ -0,0 +1,9 @@
Package: pppoe-server
Priority: optional
Section: net
Version: [TBDL]
Architecture: [TBDL]
Maintainer: OpenWrt Developers Team <bugs@openwrt.org>
Source: http://openwrt.org/cgi-bin/viewcvs.cgi/openwrt/package/rp-pppoe/
Description: PPPoE (PPP over Ethernet) server
Depends: ppp

View File

@ -0,0 +1,8 @@
Package: pppoe-sniff
Priority: optional
Section: net
Version: [TBDL]
Architecture: [TBDL]
Maintainer: OpenWrt Developers Team <bugs@openwrt.org>
Source: http://openwrt.org/cgi-bin/viewcvs.cgi/openwrt/package/rp-pppoe/
Description: PPPoE (PPP over Ethernet) frame sniffer

View File

@ -0,0 +1,170 @@
#!/usr/bin/make -f
ifneq ($(strip ${IPKG_RULES_INC}),)
include $(IPKG_RULES_INC)
endif
##
PKG_VERSION := $(shell cat ./ipkg/version)
CURRENT_DIR := $(shell pwd)
INSTALL_DIR ?= $(CURRENT_DIR)/ipkg-install
unexport INSTALL_DIR
I_PPPOE_SERVER := ipkg/pppoe-server
I_PPPOE_RELAY := ipkg/pppoe-relay
I_PPPOE_SNIFF := ipkg/pppoe-sniff
I_PPPOE_CLIENT := ipkg/pppoe-client
BUILD_DEPS = \
CONFIGURE_OPTS = \
##
all: package
.stamp-configured: $(BUILD_DEPS)
cd src ; \
rm -rf config.cache ; \
$(TARGET_CONFIGURE_OPTS) \
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 \
CFLAGS="$(TARGET_CFLAGS)" \
./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 \
$(DISABLE_LARGEFILE) \
$(DISABLE_NLS) \
$(CONFIGURE_OPTS) \
touch .stamp-configured
.stamp-built: .stamp-configured
$(MAKE) -C src \
$(TARGET_CONFIGURE_OPTS) \
touch .stamp-built
$(INSTALL_DIR)/usr/sbin/pppoe: .stamp-built
mkdir -p $(INSTALL_DIR)
$(MAKE) -C src \
DESTDIR="$(INSTALL_DIR)" \
install
configure: .stamp-configured
build: .stamp-built
install: $(INSTALL_DIR)/usr/sbin/pppoe
package: $(INSTALL_DIR)/usr/sbin/pppoe
mkdir -p $(I_PPPOE_SERVER)/etc/ppp
cp -fpR $(INSTALL_DIR)/etc/ppp/pppoe-server-options $(I_PPPOE_SERVER)/etc/ppp/
mkdir -p $(I_PPPOE_SERVER)/usr/sbin
cp -fpR $(INSTALL_DIR)/usr/sbin/pppoe-server $(I_PPPOE_SERVER)/usr/sbin/
$(STRIP) $(I_PPPOE_SERVER)/usr/sbin/*
mkdir -p $(I_PPPOE_RELAY)/usr/sbin
cp -fpR $(INSTALL_DIR)/usr/sbin/pppoe-relay $(I_PPPOE_RELAY)/usr/sbin/
$(STRIP) $(I_PPPOE_RELAY)/usr/sbin/*
mkdir -p $(I_PPPOE_SNIFF)/usr/sbin
cp -fpR $(INSTALL_DIR)/usr/sbin/pppoe-sniff $(I_PPPOE_SNIFF)/usr/sbin/
$(STRIP) $(I_PPPOE_SNIFF)/usr/sbin/*
mkdir -p $(I_PPPOE_CLIENT)/etc
cp -fpR $(INSTALL_DIR)/etc/pppoe.conf $(I_PPPOE_CLIENT)/etc/
mkdir -p $(I_PPPOE_CLIENT)/usr/sbin
cp -fpR $(INSTALL_DIR)/usr/sbin/pppoe $(I_PPPOE_CLIENT)/usr/sbin/
$(STRIP) $(I_PPPOE_CLIENT)/usr/sbin/*
cp -fpR $(INSTALL_DIR)/usr/sbin/adsl-* $(I_PPPOE_CLIENT)/usr/sbin/
chmod 0755 ipkg/*/etc/
chmod 0755 ipkg/*/etc/default/
chmod 0644 ipkg/*/etc/default/*
chmod 0755 ipkg/*/etc/init.d/
chmod 0755 ipkg/*/etc/init.d/*
chmod 0755 ipkg/*/CONTROL/
chmod 0644 ipkg/*/CONTROL/control
-chmod 0644 ipkg/*/CONTROL/conffiles
perl -pi -e "s/^Arch.*:.*/Architecture: $(ARCH)/g" ipkg/*/CONTROL/control
ifneq ($(strip $(PKG_VERSION)),)
perl -pi -e "s/^Vers.*:.*/Version: $(PKG_VERSION)/g" ipkg/*/CONTROL/control
endif
$(IPKG_BUILD) $(I_PPPOE_SERVER) $(IPKG_TARGET_DIR)
$(IPKG_BUILD) $(I_PPPOE_RELAY) $(IPKG_TARGET_DIR)
$(IPKG_BUILD) $(I_PPPOE_SNIFF) $(IPKG_TARGET_DIR)
$(IPKG_BUILD) $(I_PPPOE_CLIENT) $(IPKG_TARGET_DIR)
clean:
-$(MAKE) -C src \
clean
rm -rf .stamp-* \
$(INSTALL_DIR)/etc/pppoe.conf \
$(INSTALL_DIR)/etc/ppp/pppoe-server-options \
$(INSTALL_DIR)/usr/doc/rp-pppoe* \
$(INSTALL_DIR)/usr/sbin/adsl-* \
$(INSTALL_DIR)/usr/sbin/pppoe* \
$(INSTALL_DIR)/usr/share/man/man5/pppoe.conf.5* \
$(INSTALL_DIR)/usr/share/man/man8/adsl-*.8* \
$(INSTALL_DIR)/usr/share/man/man8/pppoe*.8* \
$(I_PPPOE_SERVER)/etc/ppp \
$(I_PPPOE_SERVER)/usr \
$(I_PPPOE_RELAY)/usr \
$(I_PPPOE_SNIFF)/usr \
$(I_PPPOE_CLIENT)/etc/ppp* \
$(I_PPPOE_CLIENT)/usr \
control:
@cat $(I_PPPOE_SERVER)/CONTROL/control
@echo
@cat $(I_PPPOE_RELAY)/CONTROL/control
@echo
@cat $(I_PPPOE_SNIFF)/CONTROL/control
@echo
@cat $(I_PPPOE_CLIENT)/CONTROL/control
@echo
.PHONY: configure build install package clean control

View File

@ -0,0 +1 @@
3.5-4

View File

@ -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

View File

@ -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

View File

@ -0,0 +1,227 @@
diff -ruN rp-pppoe-3.5-orig/scripts/adsl-connect.in rp-pppoe-3.5-4/scripts/adsl-connect.in
--- rp-pppoe-3.5-orig/scripts/adsl-connect.in 2002-07-08 16:38:24.000000000 +0200
+++ rp-pppoe-3.5-4/scripts/adsl-connect.in 2005-03-10 01:01:15.000000000 +0100
@@ -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/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/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 -ruN rp-pppoe-3.5-orig/scripts/adsl-setup.in rp-pppoe-3.5-4/scripts/adsl-setup.in
--- rp-pppoe-3.5-orig/scripts/adsl-setup.in 2002-07-08 16:38:24.000000000 +0200
+++ rp-pppoe-3.5-4/scripts/adsl-setup.in 2005-03-09 17:24:02.000000000 +0100
@@ -27,7 +27,7 @@
LANG=C
export LANG
-CONFIG=/etc/ppp/pppoe.conf
+CONFIG=/etc/pppoe.conf
# Protect created files
umask 077
@@ -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 -ruN rp-pppoe-3.5-orig/scripts/adsl-start.in rp-pppoe-3.5-4/scripts/adsl-start.in
--- rp-pppoe-3.5-orig/scripts/adsl-start.in 2002-07-08 16:38:24.000000000 +0200
+++ rp-pppoe-3.5-4/scripts/adsl-start.in 2005-03-10 00:53:13.000000000 +0100
@@ -18,7 +18,7 @@
# 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
+# If config_file is omitted, defaults to /etc/pppoe.conf
#
#***********************************************************************
@@ -36,15 +36,13 @@
export LANG
# Defaults
-CONFIG=/etc/ppp/pppoe.conf
+CONFIG=/etc/pppoe.conf
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 -ruN rp-pppoe-3.5-orig/scripts/adsl-status rp-pppoe-3.5-4/scripts/adsl-status
--- rp-pppoe-3.5-orig/scripts/adsl-status 2002-07-08 16:38:24.000000000 +0200
+++ rp-pppoe-3.5-4/scripts/adsl-status 2005-03-10 01:01:17.000000000 +0100
@@ -15,12 +15,12 @@
# LIC: GPL
#
# Usage: adsl-status [config_file]
-# If config_file is omitted, defaults to /etc/ppp/pppoe.conf
+# If config_file is omitted, defaults to /etc/pppoe.conf
#
#***********************************************************************
# Defaults
-CONFIG=/etc/ppp/pppoe.conf
+CONFIG=/etc/pppoe.conf
case "$#" in
1)
@@ -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
diff -ruN rp-pppoe-3.5-orig/scripts/adsl-stop.in rp-pppoe-3.5-4/scripts/adsl-stop.in
--- rp-pppoe-3.5-orig/scripts/adsl-stop.in 2002-07-08 16:38:24.000000000 +0200
+++ rp-pppoe-3.5-4/scripts/adsl-stop.in 2005-03-09 16:37:38.000000000 +0100
@@ -16,7 +16,7 @@
# LIC: GPL
#
# Usage: adsl-stop [config_file]
-# If config_file is omitted, defaults to /etc/ppp/pppoe.conf
+# If config_file is omitted, defaults to /etc/pppoe.conf
#
#***********************************************************************
@@ -28,7 +28,7 @@
LOGGER="/usr/bin/logger -t $ME"
CONFIG="$1"
if [ "$CONFIG" = "" ] ; then
- CONFIG=/etc/ppp/pppoe.conf
+ CONFIG=/etc/pppoe.conf
fi
if [ ! -f "$CONFIG" -o ! -r "$CONFIG" ] ; then