aboutsummaryrefslogtreecommitdiff
path: root/network/radvd
diff options
context:
space:
mode:
authorSean Donner <sean.donner@sbcglobal.net>2010-05-11 20:01:42 +0200
committerRobby Workman <rworkman@slackbuilds.org>2010-05-11 20:01:42 +0200
commit2cbbb85ddb88d186881111c52c5604289770ea97 (patch)
treedcde0cb0f1e857ba50992b5091def9025ab3364e /network/radvd
parentd4d1d6cb5828211146afb541ab33eb114f893326 (diff)
network/radvd: Added to 12.0 repository
Diffstat (limited to 'network/radvd')
-rw-r--r--network/radvd/README22
-rw-r--r--network/radvd/doinst.sh23
-rw-r--r--network/radvd/radvd.SlackBuild88
-rw-r--r--network/radvd/radvd.info8
-rw-r--r--network/radvd/rc.radvd.new44
-rw-r--r--network/radvd/slack-desc19
6 files changed, 204 insertions, 0 deletions
diff --git a/network/radvd/README b/network/radvd/README
new file mode 100644
index 0000000000000..9dc84d056dbbc
--- /dev/null
+++ b/network/radvd/README
@@ -0,0 +1,22 @@
+The router advertisement daemon (radvd) is run by Linux or BSD systems
+acting as IPv6 routers. It sends Router Advertisement messages,
+specified by RFC 2461, to a local Ethernet LAN periodically and when
+requested by a node sending a Router Solicitation message. These
+messages are required for IPv6 stateless autoconfiguration.
+
+Radvd is dependant upon IPv6 support in the Linux Kernel; this comes
+enabled by default with Slackware 12's 'generic' kernel. To enable
+IPv6 support manually, you must set the following entry in your
+kernel's '.config' file and recompile:
+ CONFIG_IPV6=m
+
+Once the Slackware package is installed, edit /etc/radvd.conf to
+reflect your current IPv6 configuration.
+
+An init script has been provided at /etc/rc.d/rc.radvd.
+To have radvd start at each boot, add the following lines to your
+/etc/rc.d/rc.local file:
+ # Start the radvd daemon:
+ if [ -x /etc/rc.d/rc.radvd ]; then
+ /etc/rc.d/rc.radvd start
+ fi
diff --git a/network/radvd/doinst.sh b/network/radvd/doinst.sh
new file mode 100644
index 0000000000000..d3f1e88aaafa2
--- /dev/null
+++ b/network/radvd/doinst.sh
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+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...
+}
+
+# Keep same perms on rc.radvd.new:
+if [ -e etc/rc.d/rc.radvd ]; then
+ cp -a etc/rc.d/rc.radvd etc/rc.d/rc.radvd.new.incoming
+ cat etc/rc.d/rc.radvd.new > etc/rc.d/rc.radvd.new.incoming
+ mv etc/rc.d/rc.radvd.new.incoming etc/rc.d/rc.radvd.new
+fi
+
+config etc/rc.d/rc.radvd.new
+config etc/radvd.conf.new
diff --git a/network/radvd/radvd.SlackBuild b/network/radvd/radvd.SlackBuild
new file mode 100644
index 0000000000000..2a724363ea684
--- /dev/null
+++ b/network/radvd/radvd.SlackBuild
@@ -0,0 +1,88 @@
+#!/bin/sh
+
+# Slackware build script for radvd
+
+# Copyright 2007-2008 Sean Donner (sean.donner@sbcglobal.net)
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PRGNAM=radvd
+VERSION=1.0
+ARCH=${ARCH:-i486}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+fi
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz || exit 1
+cd $PRGNAM-$VERSION
+chown -R root:root .
+chmod -R u+w,go+r-w,a-s .
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --with-configfile=/etc/radvd.conf \
+ --with-pidfile=/var/run/radvd/radvd.pid
+
+make all || exit 1
+make install DESTDIR=$PKG || exit 1
+
+( cd $PKG
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "current ar archive" | cut -f 1 -d : | xargs strip --strip-debug 2> /dev/null
+)
+
+( cd $PKG/usr/man
+ find . -type f -exec gzip -9 {} \;
+)
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a CHANGES COPYRIGHT INTRO.html README TODO VERSION \
+ $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/etc/rc.d
+install -m 0755 $CWD/rc.radvd.new $PKG/etc/rc.d/rc.radvd.new
+mv $TMP/$PRGNAM-$VERSION/radvd.conf.example $PKG/etc/radvd.conf.new
+
+mkdir -p $PKG/var/run/radvd/
+chown daemon:daemon $PKG/var/run/radvd/
+
+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.tgz
diff --git a/network/radvd/radvd.info b/network/radvd/radvd.info
new file mode 100644
index 0000000000000..6e12569710d5d
--- /dev/null
+++ b/network/radvd/radvd.info
@@ -0,0 +1,8 @@
+PRGNAM="radvd"
+VERSION="1.0"
+HOMEPAGE="http://www.litech.org/radvd"
+DOWNLOAD="http://www.litech.org/radvd/dist/radvd-1.0.tar.gz"
+MD5SUM="8bce4a21757cf069f5a69e2f9bee9e5b"
+MAINTAINER="Sean Donner"
+EMAIL="sean.donner@sbcglobal.net"
+APPROVED="rworkman"
diff --git a/network/radvd/rc.radvd.new b/network/radvd/rc.radvd.new
new file mode 100644
index 0000000000000..617a82b543903
--- /dev/null
+++ b/network/radvd/rc.radvd.new
@@ -0,0 +1,44 @@
+#!/bin/sh
+#
+# /etc/rc.d/rc.radvd
+#
+# Start/stop/restart the radvd daemon.
+#
+
+if ! [ -f /proc/net/if_inet6 ]; then
+ echo "IPv6 support not found; exiting..."
+ exit 1
+fi
+
+radvd_start() {
+ if [ -x /usr/sbin/radvd ]; then
+ echo "Starting radvd..."
+ echo 1 > /proc/sys/net/ipv6/conf/all/forwarding
+ /usr/sbin/radvd -u daemon
+ fi
+}
+
+radvd_stop() {
+ /bin/kill $(cat /var/run/radvd/radvd.pid)
+ rm -f /var/run/radvd/radvd.pid
+}
+
+radvd_restart() {
+ radvd_stop
+ sleep 2
+ radvd_start
+}
+
+case "$1" in
+'start')
+ radvd_start
+ ;;
+'stop')
+ radvd_stop
+ ;;
+'restart')
+ radvd_restart
+ ;;
+*)
+ echo "usage $0 start|stop|restart"
+esac
diff --git a/network/radvd/slack-desc b/network/radvd/slack-desc
new file mode 100644
index 0000000000000..c032d8df60b4d
--- /dev/null
+++ b/network/radvd/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 ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+radvd: Linux IPv6 Router Advertisement Daemon (radvd)
+radvd:
+radvd: The router advertisement daemon (radvd) is run by Linux or BSD systems
+radvd: acting as IPv6 routers. It sends Router Advertisement messages,
+radvd: specified by RFC 2461, to a local Ethernet LAN periodically and when
+radvd: requested by a node sending a Router Solicitation message. These
+radvd: messages are required for IPv6 stateless autoconfiguration.
+radvd:
+radvd:
+radvd:
+radvd: