diff --git a/srcpkgs/ppp/files/ipv6-down b/srcpkgs/ppp/files/ipv6-down new file mode 100644 index 0000000000..d3b9e28b38 --- /dev/null +++ b/srcpkgs/ppp/files/ipv6-down @@ -0,0 +1,12 @@ +#!/bin/sh +# +# This script is run by pppd after the connection has ended. +# + +# Execute all scripts in /etc/ppp/ipv6-down.d/ +for ipdown in /etc/ppp/ipv6-down.d/*.sh; do + if [ -x $ipdown ]; then + # Parameters: interface-name tty-device speed local-link-local-address remote-link-local-address ipparam + $ipdown "$@" + fi +done diff --git a/srcpkgs/ppp/files/ipv6-up b/srcpkgs/ppp/files/ipv6-up new file mode 100644 index 0000000000..b294aafdce --- /dev/null +++ b/srcpkgs/ppp/files/ipv6-up @@ -0,0 +1,12 @@ +#!/bin/sh +# +# This script is run by pppd when there's a successful ppp connection. +# + +# Execute all scripts in /etc/ppp/ipv6-up.d/ +for ipup in /etc/ppp/ipv6-up.d/*.sh; do + if [ -x $ipup ]; then + # Parameters: interface-name tty-device speed local-link-local-address remote-link-local-address ipparam + $ipup "$@" + fi +done diff --git a/srcpkgs/ppp/files/ipv6-up.d.iface-config.sh b/srcpkgs/ppp/files/ipv6-up.d.iface-config.sh new file mode 100644 index 0000000000..b23d6f61dc --- /dev/null +++ b/srcpkgs/ppp/files/ipv6-up.d.iface-config.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +echo 0 > /proc/sys/net/ipv6/conf/$1/use_tempaddr +echo 2 > /proc/sys/net/ipv6/conf/$1/accept_ra diff --git a/srcpkgs/ppp/files/plog b/srcpkgs/ppp/files/plog deleted file mode 100644 index 84d2c7340c..0000000000 --- a/srcpkgs/ppp/files/plog +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -if [ -s /var/log/ppp.log ]; then - exec tail "$@" /var/log/ppp.log -else - exec tail "$@" /var/log/syslog | grep ' \(pppd\|chat\)\[' -fi diff --git a/srcpkgs/ppp/files/poff b/srcpkgs/ppp/files/poff deleted file mode 100644 index 8b4dffc59e..0000000000 --- a/srcpkgs/ppp/files/poff +++ /dev/null @@ -1,103 +0,0 @@ -#!/bin/sh - -# Written by John Hasler and based on work -# by Phil Hands . Distributed under the GNU GPL - -if [ -x /usr/bin/kill ]; then - KILL="/usr/bin/kill" -else - KILL="/bin/kill" -fi -SIG=TERM -DONE="stopped" -MODE="" - -usage () -{ - cat <" distfiles="ftp://ftp.samba.org/pub/ppp/ppp-$version.tar.gz" -checksum=43317afec9299f9920b96f840414c977f0385410202d48e56d2fdb8230003505 - -CFLAGS="-D_GNU_SOURCE" +checksum=1b33181a03962c8a092c055fb9980e9722728a8d98a4bb7ec7acda17c1b1b49d makedepends="libpcap-devel" conf_files=" /etc/ppp/ip-up - /etc/ppp/chap-secrets - /etc/ppp/options /etc/ppp/ip-down + /etc/ppp/ipv6-up + /etc/ppp/ipv6-down + /etc/ppp/options + /etc/ppp/chap-secrets /etc/ppp/pap-secrets" do_configure() { # Custom CFLAGS. - sed -i "s:-O2 -pipe -Wall -g:${CFLAGS}:" \ - ${wrksrc}/pppd/Makefile.linux - sed -i "s:-g -O2:${CFLAGS}:" ${wrksrc}/pppd/plugins/Makefile.linux - sed -i "s:-O2:${CFLAGS}:" ${wrksrc}/pppstats/Makefile.linux - sed -i "s:-O2 -g -pipe:${CFLAGS}:" ${wrksrc}/chat/Makefile.linux - sed -i "s:-O:${CFLAGS}:" ${wrksrc}/pppdump/Makefile.linux + sed -i "s:-O2 -pipe -Wall -g:${CFLAGS}:" pppd/Makefile.linux + sed -i "s:-g -O2:${CFLAGS}:" pppd/plugins/Makefile.linux + sed -i "s:-O2:${CFLAGS}:" pppstats/Makefile.linux + sed -i "s:-O2 -g -pipe:${CFLAGS}:" chat/Makefile.linux + sed -i "s:-O:${CFLAGS}:" pppdump/Makefile.linux # Enable active filter - sed -i "s:^#FILTER=y:FILTER=y:" ${wrksrc}/pppd/Makefile.linux + sed -i "s:^#FILTER=y:FILTER=y:" pppd/Makefile.linux # Enable ipv6 support - sed -i "s:^#HAVE_INET6=y:HAVE_INET6=y:" ${wrksrc}/pppd/Makefile.linux + sed -i "s:^#HAVE_INET6=y:HAVE_INET6=y:" pppd/Makefile.linux # Enable Microsoft Proprietary Callback Control Protocol - sed -i "s:^#CBCP=y:CBCP=y:" ${wrksrc}/pppd/Makefile.linux + sed -i "s:^#CBCP=y:CBCP=y:" pppd/Makefile.linux ./configure --prefix=/usr } @@ -49,34 +48,31 @@ do_install() { make DESTDIR=${DESTDIR}/usr install chmod 755 ${DESTDIR}/usr/lib/pppd/${version}/*.so - install -m755 ${wrksrc}/pppd/pppd ${DESTDIR}/usr/sbin - install -m755 ${wrksrc}/chat/chat ${DESTDIR}/usr/sbin - install -D -m644 ${FILESDIR}/options \ - ${DESTDIR}/etc/ppp/options - install -D -m755 ${FILESDIR}/ip-up \ - ${DESTDIR}/etc/ppp/ip-up - install -D -m755 ${FILESDIR}/ip-down \ - ${DESTDIR}/etc/ppp/ip-dowm - install -d -m755 ${DESTDIR}/etc/ppp/ip-up.d - install -d -m755 ${DESTDIR}/etc/ppp/ip-down.d - install -m755 ${FILESDIR}/ip-up.d.dns.sh \ - ${DESTDIR}/etc/ppp/ip-up.d/00-dns.sh - install -m755 ${FILESDIR}/ip-down.d.dns.sh \ - ${DESTDIR}/etc/ppp/ip-down.d/00-dns.sh - install -D -m755 ${FILESDIR}/pon \ - ${DESTDIR}/usr/bin/pon - install -D -m755 ${FILESDIR}/poff \ - ${DESTDIR}/usr/bin/poff - install -D -m755 ${FILESDIR}/plog \ - ${DESTDIR}/usr/sbin/plog - install -D -m600 ${wrksrc}/etc.ppp/pap-secrets \ - ${DESTDIR}/etc/ppp/pap-secrets - install -D -m600 ${wrksrc}/etc.ppp/chap-secrets \ - ${DESTDIR}/etc/ppp/chap-secrets - #install -D -m644 ${FILESDIR}/pon.1 \ - # ${DESTDIR}/usr/share/man/man1/pon.1 || return 1 - install -d -m755 ${DESTDIR}/etc/ppp/peers + vinstall pppd/pppd 755 usr/sbin + vinstall chat/chat 755 usr/sbin + + vinstall ${FILESDIR}/options 644 etc/ppp + vinstall ${FILESDIR}/ip-up 755 etc/ppp + vinstall ${FILESDIR}/ip-down 755 etc/ppp + vinstall ${FILESDIR}/ipv6-up 755 etc/ppp + vinstall ${FILESDIR}/ipv6-down 755 etc/ppp + + vinstall ${FILESDIR}/ip-up.d.dns.sh 755 etc/ppp/ip-up.d 00-dns.sh + vinstall ${FILESDIR}/ip-down.d.dns.sh 755 etc/ppp/ip-down.d 00-dns.sh + vinstall ${FILESDIR}/ipv6-up.d.iface-config.sh 755 etc/ppp/ipv6-up.d 00-iface-config.sh + vmkdir etc/ppp/ipv6-down.d + touch ${DESTDIR}/etc/ppp/ipv6-down.d/.empty_on_purpose + + vinstall scripts/pon 755 usr/bin + vinstall scripts/pon.1 644 usr/share/man/man1 + vinstall scripts/poff 755 usr/bin + vinstall scripts/plog 755 usr/sbin + + vinstall etc.ppp/pap-secrets 600 etc/ppp + vinstall etc.ppp/chap-secrets 600 etc/ppp + + vmkdir etc/ppp/peers touch -f ${DESTDIR}/etc/ppp/peers/.empty_on_purpose }