From e2e6940857c635df49af42aced1e8a2fe293f665 Mon Sep 17 00:00:00 2001 From: James Meyer Date: Sun, 16 Feb 2014 17:58:36 -0600 Subject: ppp: update binary path to /usr/bin refs #961 --- abs/core/ppp/PKGBUILD | 59 +++++++++------- abs/core/ppp/ip-down | 2 +- abs/core/ppp/ip-down.d.dns.sh | 6 +- abs/core/ppp/ip-up.d.dns.sh | 10 ++- abs/core/ppp/ipv6-down | 12 ++++ abs/core/ppp/ipv6-up | 12 ++++ abs/core/ppp/ipv6-up.d.iface-config.sh | 4 ++ abs/core/ppp/plog | 7 -- abs/core/ppp/poff | 103 ---------------------------- abs/core/ppp/pon | 32 --------- abs/core/ppp/pon.1 | 121 --------------------------------- abs/core/ppp/ppp | 36 ---------- abs/core/ppp/ppp.systemd | 9 +++ 13 files changed, 83 insertions(+), 330 deletions(-) create mode 100644 abs/core/ppp/ipv6-down create mode 100644 abs/core/ppp/ipv6-up create mode 100644 abs/core/ppp/ipv6-up.d.iface-config.sh delete mode 100644 abs/core/ppp/plog delete mode 100644 abs/core/ppp/poff delete mode 100644 abs/core/ppp/pon delete mode 100644 abs/core/ppp/pon.1 delete mode 100644 abs/core/ppp/ppp create mode 100644 abs/core/ppp/ppp.systemd diff --git a/abs/core/ppp/PKGBUILD b/abs/core/ppp/PKGBUILD index 33c7ecc..fb099a3 100644 --- a/abs/core/ppp/PKGBUILD +++ b/abs/core/ppp/PKGBUILD @@ -1,37 +1,24 @@ -# $Id: PKGBUILD 142987 2011-11-19 20:10:23Z thomas $ +# $Id: PKGBUILD 188844 2013-06-22 15:33:40Z thomas $ # Maintainer: Thomas Baechler pkgname=ppp pkgver=2.4.5 -pkgrel=3 +pkgrel=8 pkgdesc="A daemon which implements the Point-to-Point Protocol for dial-up networking" arch=(i686 x86_64) url="http://www.samba.org/ppp/" license=('custom:GPL/BSD') -groups=('base') depends=('glibc' 'libpcap>=1.0.0') -backup=(etc/ppp/{chap-secrets,pap-secrets,options,ip-up,ip-down}) +backup=(etc/ppp/{chap-secrets,pap-secrets,options,ip-up,ip-down,ip-down.d/00-dns.sh,ip-up.d/00-dns.sh,ipv6-up.d/00-iface-config.sh}) source=(ftp://ftp.samba.org/pub/ppp/ppp-${pkgver}.tar.gz options - pon - poff - ppp - plog - pon.1 ip-up ip-down ip-up.d.dns.sh - ip-down.d.dns.sh) -md5sums=('4621bc56167b6953ec4071043fe0ec57' - '7a9259a8f038073eeea7e4552ff1849f' - '48c024f73a80c8b69c4def22f86902cc' - '2d811f8470ccdea3b8c4505a438483e9' - '7561c73b557292d5ba1a9c5dbd270fde' - '86cdaf133f7a79fb464f02d83afc7734' - '44cc662ba9aa61dd9add3ddd4c5ded57' - 'e4beb16ed600b61336d50b2bd2df7cd5' - '2fa0671f40711e69194ccf60979f8b33' - '4a074d74c29625b254a1db720cb87b99' - '8d1be5af8e46393ba6eb273377831e38') + ip-down.d.dns.sh + ipv6-up + ipv6-down + ipv6-up.d.iface-config.sh + ppp.systemd) build() { cd "${srcdir}/${pkgname}-${pkgver}" @@ -68,13 +55,33 @@ package() { install -d -m755 "${pkgdir}/etc/ppp/ip-down.d" install -m755 ../ip-up.d.dns.sh "${pkgdir}/etc/ppp/ip-up.d/00-dns.sh" install -m755 ../ip-down.d.dns.sh "${pkgdir}/etc/ppp/ip-down.d/00-dns.sh" - install -D -m755 ../pon "${pkgdir}/usr/bin/pon" - install -D -m755 ../poff "${pkgdir}/usr/bin/poff" - install -D -m755 ../plog "${pkgdir}/usr/sbin/plog" + install -D -m755 ../ipv6-up "${pkgdir}/etc/ppp/ipv6-up" + install -D -m755 ../ipv6-down "${pkgdir}/etc/ppp/ipv6-down" + install -d -m755 "${pkgdir}/etc/ppp/ipv6-up.d" + install -d -m755 "${pkgdir}/etc/ppp/ipv6-down.d" + install -m755 ../ipv6-up.d.iface-config.sh "${pkgdir}/etc/ppp/ipv6-up.d/00-iface-config.sh" + install -D -m755 scripts/pon "${pkgdir}/usr/bin/pon" + install -D -m755 scripts/poff "${pkgdir}/usr/bin/poff" + install -D -m755 scripts/plog "${pkgdir}/usr/sbin/plog" + install -D -m644 scripts/pon.1 "${pkgdir}/usr/share/man/man1/pon.1" install -D -m600 etc.ppp/pap-secrets "${pkgdir}/etc/ppp/pap-secrets" install -D -m600 etc.ppp/chap-secrets "${pkgdir}/etc/ppp/chap-secrets" - install -D -m755 ${srcdir}/ppp "${pkgdir}/etc/rc.d/ppp" - install -D -m644 ${srcdir}/pon.1 "${pkgdir}/usr/share/man/man1/pon.1" install -d -m755 "${pkgdir}/etc/ppp/peers" chmod 0755 "${pkgdir}/usr/lib/pppd/${pkgver}"/*.so + install -D -m644 "${srcdir}"/ppp.systemd "${pkgdir}"/usr/lib/systemd/system/ppp@.service + + # usrmove + cd "$pkgdir"/usr + mv sbin/* bin/ + rmdir sbin } +md5sums=('4621bc56167b6953ec4071043fe0ec57' + '7a9259a8f038073eeea7e4552ff1849f' + 'e4beb16ed600b61336d50b2bd2df7cd5' + '529b924f644f80cf30d72a966abc7419' + '0e2eeb1af125a46291999162dcc9004a' + '3a5d56ac23e36cdbf48187813c8ec981' + '4cbd0a9af01c27067450ec7d3f5fa673' + 'b75c2fbc4afa9f2d8108b680c88c7036' + '9dde53aa5a931ebe1c7e3469199777c5' + '37401eb0c3dcccb87f5ac4716d0f9f2c') diff --git a/abs/core/ppp/ip-down b/abs/core/ppp/ip-down index 301f3ab..cfd3ae0 100644 --- a/abs/core/ppp/ip-down +++ b/abs/core/ppp/ip-down @@ -3,7 +3,7 @@ # This script is run by pppd after the connection has ended. # -# Execute all scripts in /etc/ppp/ip-up.d/ +# Execute all scripts in /etc/ppp/ip-down.d/ for ipdown in /etc/ppp/ip-down.d/*.sh; do if [ -x $ipdown ]; then # Parameters: interface-name tty-device speed local-IP-address remote-IP-address ipparam diff --git a/abs/core/ppp/ip-down.d.dns.sh b/abs/core/ppp/ip-down.d.dns.sh index 9e19f7d..c9da47a 100644 --- a/abs/core/ppp/ip-down.d.dns.sh +++ b/abs/core/ppp/ip-down.d.dns.sh @@ -1,3 +1,7 @@ #!/bin/sh -[ -e /etc/resolv.conf.backup.${IFNAME} ] && mv /etc/resolv.conf.backup.${IFNAME} /etc/resolv.conf +if [ -x /usr/bin/resolvconf ]; then + /usr/bin/resolvconf -fd ${IFNAME} +else + [ -e /etc/resolv.conf.backup.${IFNAME} ] && mv /etc/resolv.conf.backup.${IFNAME} /etc/resolv.conf +fi diff --git a/abs/core/ppp/ip-up.d.dns.sh b/abs/core/ppp/ip-up.d.dns.sh index f9df543..0fc737e 100644 --- a/abs/core/ppp/ip-up.d.dns.sh +++ b/abs/core/ppp/ip-up.d.dns.sh @@ -1,7 +1,11 @@ #!/bin/sh if [ "$USEPEERDNS" = "1" -a -f /etc/ppp/resolv.conf ]; then - [ -e /etc/resolv.conf ] && mv /etc/resolv.conf /etc/resolv.conf.backup.${IFNAME} - mv /etc/ppp/resolv.conf /etc/resolv.conf - chmod 644 /etc/resolv.conf + if [ -x /usr/bin/resolvconf ]; then + /usr/bin/resolvconf -a ${IFNAME} /proc/sys/net/ipv6/conf/$1/use_tempaddr +echo 2 > /proc/sys/net/ipv6/conf/$1/accept_ra diff --git a/abs/core/ppp/plog b/abs/core/ppp/plog deleted file mode 100644 index 84d2c73..0000000 --- a/abs/core/ppp/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/abs/core/ppp/poff b/abs/core/ppp/poff deleted file mode 100644 index 8b4dffc..0000000 --- a/abs/core/ppp/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 < pon.txt -.\" -.TH PON 1 "July 2000" "Debian Project" "Debian PPPD" -.SH NAME -pon, poff, plog \- starts up, shuts down or lists the log of PPP connections -.SH SYNOPSIS -.B pon -[ isp-name [ options ] ] -.br -.B poff -[ -r ] [ -d ] [ -c ] [ -a ] [ -h ] [ isp-name ] -.br -.B plog -[ arguments ] -.SH DESCRIPTION -This manual page describes the \fBpon\fP, \fBplog\fP and \fBpoff\fP -scripts, which allow users to control PPP connections. -.. -.SS pon -\fBpon\fP, invoked without arguments, runs the \fI/etc/ppp/ppp_on_boot\fP -file, if it exists and is executable. Otherwise, a PPP connection will be -started using configuration from \fI/etc/ppp/peers/provider\fP. -This is the default behaviour unless an \fBisp-name\fP argument is given. -.PP -For instance, to use ISP configuration "myisp" run: -.IP -pon myisp -.PP -\fBpon\fP will then use the options file \fI/etc/ppp/peers/myisp\fP. -You can pass additional \fBoptions\fP after the ISP name, too. -\fBpon\fP can be used to run multiple, simultaneous PPP connections. -.. -.SS poff -\fBpoff\fP closes a PPP connection. If more than one PPP connection exists, -the one named in the argument to \fBpoff\fP will be killed, e.g. -.IP -poff myprovider2 -.PP -will terminate the connection to myprovider2, and leave the PPP connections -to e.g. "myprovider1" or "myprovider3" up and running. -.PP -\fBpoff\fP takes the following command line options: -.RS -.TP -.B "\-r" -causes the connection to be redialed after it is dropped. -.TP -.B "\-d" -toggles the state of pppd's debug option. -.TP -.B "\-c" -causes -.BR pppd (8) -to renegotiate compression. -.TP -.B "\-a" -stops all running ppp connections. If the argument \fBisp-name\fP -is given it will be ignored. -.TP -.B "\-h" -displays help information. -.TP -.B "\-v" -prints the version and exits. -.PP -If no argument is given, \fBpoff\fP will stop or signal pppd if and only -if there is exactly one running. If more than one connection is active, -it will exit with an error code of 1. -.. -.SS plog -\fBplog\fP shows you the last few lines of \fI/var/log/ppp.log\fP. If that -file doesn't exist, it shows you the last few lines of your -\fI/var/log/syslog\fP file, but excluding the lines not generated by pppd. -This script makes use of the -.BR tail (1) -command, so arguments that can be passed to -.BR tail (1) -can also be passed to \fBplog\fP. -.PP -Note: the \fBplog\fP script can only be used by root or another system -administrator in group "adm", due to security reasons. Also, to have all -pppd-generated information in one logfile, that plog can show, you need the -following line in your \fI/etc/syslog.conf\fP file: -.PP -local2.* -/var/log/ppp.log -.RE -.SH FILES -.TP -.I /etc/ppp/options -PPPd system options file. -.TP -.I /etc/ppp/pap-secrets -System PAP passwords file. -.TP -.I /etc/ppp/chap-secrets -System CHAP passwords file. -.TP -.I /etc/ppp/peers/ -Directory holding the peer options files. The default file is called -\fIprovider\fP. -.TP -.I /etc/chatscripts/provider -The chat script invoked from the default \fI/etc/ppp/peers/provider\fP. -.TP -.I /var/log/ppp.log -The default PPP log file. -.SH AUTHORS -The p-commands were written by Christoph Lameter . -Updated and revised by Philip Hands . -.br -This manual was written by Othmar Pasteka . Modified -by Rob Levin , with some extensions taken from -the old p-commands manual written by John Hasler . -.SH "SEE ALSO" -.BR pppd (8), -.BR chat (8), -.BR tail (1). - diff --git a/abs/core/ppp/ppp b/abs/core/ppp/ppp deleted file mode 100644 index 16e01ba..0000000 --- a/abs/core/ppp/ppp +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash - -. /etc/rc.conf -. /etc/rc.d/functions - -PID=`pidof -o %PPID /usr/sbin/pppd` -case "$1" in - start) - stat_busy "Starting PPP daemon" - [ -z "$PID" ] && /usr/bin/pon - if [ $? -gt 0 ]; then - stat_fail - else - add_daemon ppp - stat_done - fi - ;; - stop) - stat_busy "Stopping PPP daemon" - [ ! -z "$PID" ] && poff -a &> /dev/null - if [ $? -gt 0 ]; then - stat_fail - else - rm_daemon ppp - stat_done - fi - ;; - restart) - $0 stop - sleep 1 - $0 start - ;; - *) - echo "usage: $0 {start|stop|restart}" -esac -exit 0 diff --git a/abs/core/ppp/ppp.systemd b/abs/core/ppp/ppp.systemd new file mode 100644 index 0000000..8a963af --- /dev/null +++ b/abs/core/ppp/ppp.systemd @@ -0,0 +1,9 @@ +[Unit] +Description=PPP link to %I +Before=network.target + +[Service] +ExecStart=/usr/sbin/pppd call %I nodetach nolog + +[Install] +WantedBy=multi-user.target -- cgit v0.12