summaryrefslogtreecommitdiff
path: root/community/radvd
diff options
context:
space:
mode:
authorParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
committerParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
commit415856bdd4f48ab4f2732996f0bae58595092bbe (patch)
treeede2018b591f6dfb477fe9341ba17b9bc000fab9 /community/radvd
Tue Apr 5 14:26:38 UTC 2011
Diffstat (limited to 'community/radvd')
-rw-r--r--community/radvd/PKGBUILD30
-rw-r--r--community/radvd/radvd.install28
-rw-r--r--community/radvd/radvd.rc.d38
3 files changed, 96 insertions, 0 deletions
diff --git a/community/radvd/PKGBUILD b/community/radvd/PKGBUILD
new file mode 100644
index 000000000..32a668db6
--- /dev/null
+++ b/community/radvd/PKGBUILD
@@ -0,0 +1,30 @@
+# $Id: PKGBUILD 38596 2011-01-28 17:42:11Z kchen $
+# Maintainer: Kaiting Chen <kaitocracy@gmail.com>
+# Contributor: Mark Smith <markzzzsmith@yahoo.com.au>
+
+pkgname=radvd
+pkgver=1.7
+pkgrel=1
+pkgdesc='IPv6 Router Advertisement / Router Solicitation daemon'
+url='http://www.litech.org/radvd/'
+license=('custom')
+depends=('glibc')
+arch=('i686' 'x86_64')
+install=radvd.install
+source=("${url}dist/$pkgname-$pkgver.tar.gz" 'radvd.rc.d')
+md5sums=('5ec417bde33964a07231ddf6353177c8'
+ '65a585f5850a1ac2a0c2c2a7096ec92a')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man
+ make; make DESTDIR=$pkgdir install
+
+ install -Dm644 radvd.conf.example \
+ $pkgdir/usr/share/doc/radvd/radvd.conf.example
+ install -Dm644 COPYRIGHT \
+ $pkgdir/usr/share/licenses/$pkgname/COPYRIGHT
+ install -Dm755 $srcdir/radvd.rc.d $pkgdir/etc/rc.d/radvd
+}
diff --git a/community/radvd/radvd.install b/community/radvd/radvd.install
new file mode 100644
index 000000000..fc0b7f852
--- /dev/null
+++ b/community/radvd/radvd.install
@@ -0,0 +1,28 @@
+post_install() {
+cat << EOF
+
+To use radvd you must create the configuration file
+
+ /etc/radvd.conf
+
+An example configuration file has been installed at
+
+ /usr/share/doc/radvd/radvd.conf.example
+
+radvd requires IPv6 forwarding be enabled.
+To enable IPv6 forwarding at boot time,
+add the following line to /etc/sysctl.conf:
+
+ # Enable IPv6 packet forwarding
+ net.ipv6.conf.all.forwarding = 1
+
+or manually enable forwarding using:
+
+ echo 1 > /proc/sys/net/ipv6/conf/all/forwarding
+
+EOF
+}
+
+op=$1
+shift
+$op $*
diff --git a/community/radvd/radvd.rc.d b/community/radvd/radvd.rc.d
new file mode 100644
index 000000000..f8c9ea571
--- /dev/null
+++ b/community/radvd/radvd.rc.d
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+### /etc/rc.d/radvd: Initscript for radvd Daemon
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+PID=`pidof -o %PPID /usr/sbin/radvd`
+case "$1" in
+ start)
+ stat_busy "Starting radvd Daemon"
+ [ -z "$PID" ] && \
+ /usr/sbin/radvd &> /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else stat_done; add_daemon radvd
+ echo $PID > /var/run/radvd.pid
+ fi ;;
+ stop)
+ stat_busy "Stopping radvd Daemon"
+ [ ! -z "$PID" ] \
+ && kill $PID &>/dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ stat_done; rm_daemon radvd
+ fi ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+
+exit 0
+
+### /etc/rc.d/radvd: Initscript for radvd Daemon