diff options
Diffstat (limited to 'network')
-rw-r--r-- | network/openl2tp/Makefile.diff | 11 | ||||
-rw-r--r-- | network/openl2tp/README | 17 | ||||
-rw-r--r-- | network/openl2tp/README.SLACKWARE | 24 | ||||
-rw-r--r-- | network/openl2tp/doinst.sh | 27 | ||||
-rw-r--r-- | network/openl2tp/openl2tp.SlackBuild | 90 | ||||
-rw-r--r-- | network/openl2tp/openl2tp.info | 10 | ||||
-rw-r--r-- | network/openl2tp/sample.conf | 17 | ||||
-rw-r--r-- | network/openl2tp/slack-desc | 19 |
8 files changed, 215 insertions, 0 deletions
diff --git a/network/openl2tp/Makefile.diff b/network/openl2tp/Makefile.diff new file mode 100644 index 0000000000..3f136aac2c --- /dev/null +++ b/network/openl2tp/Makefile.diff @@ -0,0 +1,11 @@ +--- ./Makefile.orig 2010-11-22 11:47:26.000000000 +0200 ++++ ./Makefile 2011-06-21 22:51:24.000000000 +0300 +@@ -158,7 +158,7 @@ + $(CPPFLAGS) $(CPPFLAGS.dmalloc) \ + -DSYS_LIBDIR=$(SYS_LIBDIR) + LDFLAGS.l2tpd= -Wl,-E -L. -Lusl -lusl -ldl $(LIBS.dmalloc) -lc +-LDFLAGS.l2tpconfig= -Lcli -lcli -lreadline $(LIBS.dmalloc) $(READLINE_LDFLAGS) -lc ++LDFLAGS.l2tpconfig= -Lcli -lcli -lreadline -ltermcap $(LIBS.dmalloc) $(READLINE_LDFLAGS) -lc + + OPT_CFLAGS?= -O + diff --git a/network/openl2tp/README b/network/openl2tp/README new file mode 100644 index 0000000000..fe4ea05077 --- /dev/null +++ b/network/openl2tp/README @@ -0,0 +1,17 @@ +OpenL2TP is a complete implementation of RFC2661 - Layer Two Tunneling +Protocol Version 2, able to operate as both a server and a client. + +OpenL2TP has been written specifically for Linux. It consists of +- a daemon, openl2tpd, handling the L2TP control protocol exchanges + for all tunnels and sessions +- a plugin for pppd to allow its PPP connections to run over L2TP + sessions +- a Linux kernel driver for efficient datapath (packaged separately). +- a command line application for management. + +All data packets are handled by the Linux kernel in order that the +datapath be as efficient as possible. The Linux PPP-over-L2TP kernel +driver (pppol2tp.o) must be loaded either dynamically as a kernel +module or linked in statically. + +See README.SLACKWARE for post-installation configuration notes. diff --git a/network/openl2tp/README.SLACKWARE b/network/openl2tp/README.SLACKWARE new file mode 100644 index 0000000000..204e78ad81 --- /dev/null +++ b/network/openl2tp/README.SLACKWARE @@ -0,0 +1,24 @@ +To start openl2tpd at boot, you will need to add the following +lines to /etc/rc.d/rc.local: + + if [ -x /etc/rc.d/rc.openl2tpd ]; then + /etc/rc.d/rc.openl2tpd start + fi + +Then add the following lines to /etc/rc.d/rc.local_shutdown: + + if [ -x /etc/rc.d/rc.openl2tpd ]; then + /etc/rc.d/rc.openl2tpd stop + fi + +Then make sure /etc/rc.d/rc.rpc is executable: + # chmod 0755 /etc/rc.d/rc.rpc + +############################################################## + +If you want to start it without a reboot, first follow the +above directions, and then do this: + + # /etc/rc.d/rc.rpc start + # /etc/rc.d/rc.openl2tpd start + diff --git a/network/openl2tp/doinst.sh b/network/openl2tp/doinst.sh new file mode 100644 index 0000000000..f62e4e7af9 --- /dev/null +++ b/network/openl2tp/doinst.sh @@ -0,0 +1,27 @@ +config() { + NEW="$1" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + # If there's no config file by that name, mv it over: + if [ ! -r $OLD ]; then + mv $NEW $OLD + elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then + # toss the redundant copy + rm $NEW + fi + # Otherwise, we leave the .new copy for the admin to consider... +} +preserve_perms() { + NEW="$1" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + if [ -e $OLD ]; then + cp -a $OLD ${NEW}.incoming + cat $NEW > ${NEW}.incoming + mv ${NEW}.incoming $NEW + fi + config $NEW +} + +preserve_perms etc/rc.d/rc.openl2tpd.new +config etc/sysconfig/openl2tpd.new +config etc/openl2tpd.conf.new + diff --git a/network/openl2tp/openl2tp.SlackBuild b/network/openl2tp/openl2tp.SlackBuild new file mode 100644 index 0000000000..b2f985fba3 --- /dev/null +++ b/network/openl2tp/openl2tp.SlackBuild @@ -0,0 +1,90 @@ +#!/bin/sh +# +# Slackware build script for openl2tp +# +# Written by Eugene P. <pieu@mail.ru> +# + +PRGNAM=openl2tp +VERSION=${VERSION:-1.8} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i486 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION + +chown -R root:root . +find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \; + +patch -p1 < $CWD/Makefile.diff + +make OPT_CFLAGS="$SLKCFLAGS" SYS_LIBDIR=/usr/lib${LIBDIRSUFFIX} +make install DESTDIR=$PKG + +find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + +# Move and fix perms on manpages +mv $PKG/usr/share/man $PKG/usr ; rmdir $PKG/usr/share +find $PKG/usr/man -type f -exec chmod 0644 {} \; + +mkdir -p $PKG/etc/rc.d +cat etc/rc.d/init.d/openl2tpd > $PKG/etc/rc.d/rc.openl2tpd.new +chmod 0755 $PKG/etc/rc.d/rc.openl2tpd.new + +mkdir -p $PKG/etc/sysconfig +sed -e "s,^OPENL2TPD_CONFIG_FILE=.*$,OPENL2TPD_CONFIG_FILE=/etc/openl2tpd.conf," \ + etc/sysconfig/openl2tpd > $PKG/etc/sysconfig/openl2tpd.new + +# Copy config files for the OpenL2TP daemon +cat $CWD/sample.conf > $PKG/etc/openl2tpd.conf.new + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a \ + README CHANGES LICENSE COPYING INSTALL \ + $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc +cat $CWD/doinst.sh > $PKG/install/doinst.sh + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/network/openl2tp/openl2tp.info b/network/openl2tp/openl2tp.info new file mode 100644 index 0000000000..e1a86fe3e7 --- /dev/null +++ b/network/openl2tp/openl2tp.info @@ -0,0 +1,10 @@ +PRGNAM="openl2tp" +VERSION="1.8" +HOMEPAGE="http://www.openl2tp.org/" +DOWNLOAD="http://sourceforge.net/projects/openl2tp/files/openl2tp/1.8/openl2tp-1.8.tar.gz" +MD5SUM="e3d08dedfb9e6a9a1e24f6766f6dadd0" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +MAINTAINER="Eugene P." +EMAIL="pieu@mail.ru" +APPROVED="rworkman" diff --git a/network/openl2tp/sample.conf b/network/openl2tp/sample.conf new file mode 100644 index 0000000000..fba34766c7 --- /dev/null +++ b/network/openl2tp/sample.conf @@ -0,0 +1,17 @@ +system modify deny_remote_tunnel_creates=yes \ + tunnel_establish_timeout=60 \ + session_establish_timeout=30 \ + tunnel_persist_pend_timeout=60 \ + session_persist_pend_timeout=30 + +peer profile modify profile_name=default lac_lns=lac + +ppp profile modify profile_name=default \ + auth_pap=no auth_eap=no auth_none=no auth_mschapv1=no auth_mschapv2=yes \ + default_route=no proxy_arp=no + +tunnel create tunnel_name=CONNECTION_NAME dest_ipaddr=VPN_SERVER_IP persist=yes + +session create tunnel_name=CONNECTION_NAME session_name=CONNECTION_NAME \ + user_name="LOGIN" user_password="PASSWORD" + diff --git a/network/openl2tp/slack-desc b/network/openl2tp/slack-desc new file mode 100644 index 0000000000..68772fcdfb --- /dev/null +++ b/network/openl2tp/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' +# on the right side marks the last column you can put a character in. You must +# make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +openl2tp: OpenL2TP (Layer Two Tunneling Protocol Version 2) +openl2tp: +openl2tp: OpenL2TP has been written specifically for Linux. It consists of +openl2tp: - a daemon, openl2tpd, handling the L2TP control protocol exchanges +openl2tp: for all tunnels and sessions +openl2tp: - a plugin for pppd to allow its PPP connections to run over L2TP +openl2tp: - a kernel driver for efficient datapath (packaged separately) +openl2tp: - a command line application for management. +openl2tp: +openl2tp: http://www.openl2tp.org/ +openl2tp: |