diff options
author | Florian Pritz <bluewind@xssn.at> | 2010-07-13 09:05:18 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xssn.at> | 2010-07-13 09:05:18 +0200 |
commit | 953368befe24437af41c0309263040ec6ce5d25d (patch) | |
tree | 5f9275898d8fa8d88ae43d0e696b5c7c20d56244 /radvd | |
parent | 8d23351755ef023dc68e90de539ae086dda7dcec (diff) | |
download | aur-packages-953368befe24437af41c0309263040ec6ce5d25d.tar.gz aur-packages-953368befe24437af41c0309263040ec6ce5d25d.tar.xz |
update
Signed-off-by: Florian Pritz <bluewind@xssn.at>
Diffstat (limited to 'radvd')
-rw-r--r-- | radvd/PKGBUILD | 39 | ||||
-rw-r--r-- | radvd/radvd.install | 57 | ||||
-rw-r--r-- | radvd/radvd.rc.d | 37 |
3 files changed, 133 insertions, 0 deletions
diff --git a/radvd/PKGBUILD b/radvd/PKGBUILD new file mode 100644 index 0000000..8a36e8c --- /dev/null +++ b/radvd/PKGBUILD @@ -0,0 +1,39 @@ +# Contributor: Mark Smith <markzzzsmith@yahoo.com.au> +pkgname=radvd +pkgver=1.6 +pkgrel=1 +pkgdesc="IPv6 Router Advertisement / Router Solicitation daemon" +url="http://www.litech.org/radvd/" +license="custom" +arch=('i686' 'x86_64') +makedepends=('automake' 'gcc' 'coreutils' 'sed' 'bison' 'flex' \ + 'tar' 'gzip' 'glibc' ) +depends=('glibc') +backup=(etc/$pkgname/radvd.conf) +install=radvd.install +source=(http://www.litech.org/radvd/dist/$pkgname-$pkgver.tar.gz + radvd.rc.d + radvd.install) +md5sums=('987e0660d68b4501b24dc5a068cea83c' + '0ceec38160497fb99ca6879c27e9255a' + 'b02517cc251dba4a2910395de878bde9') + +build() { + + cd $startdir/src/$pkgname-$pkgver + + ./configure --prefix=/usr\ + --sysconfdir=/etc/$pkgname \ + --mandir=/usr/share/man + + make + + make DESTDIR=$startdir/pkg install + + install -D -m444 COPYRIGHT $startdir/pkg/usr/share/licenses/$pkgname/COPYRIGHT + install -D -m444 $startdir/src/$pkgname-$pkgver/radvd.conf.example \ + $startdir/pkg/etc/$pkgname/radvd.conf.example + + install -D -m755 $startdir/radvd.rc.d $startdir/pkg/etc/rc.d/radvd + +} diff --git a/radvd/radvd.install b/radvd/radvd.install new file mode 100644 index 0000000..c049cbd --- /dev/null +++ b/radvd/radvd.install @@ -0,0 +1,57 @@ +# arg 1: the new package version +pre_install() { + /bin/true +} + +# arg 1: the new package version +post_install() { + + cat << EOF + +NOTE +---- + +radvd requires IPv6 forwarding be enabled. To enable IPv6 forwarding at +boot time, add the following 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 + + /bin/true + +} + +# arg 1: the new package version +# arg 2: the old package version +pre_upgrade() { + /bin/true +} + +# arg 1: the new package version +# arg 2: the old package version +post_upgrade() { + /bin/true +} + +# arg 1: the old package version +pre_remove() { + /bin/true +} + +# arg 1: the old package version +post_remove() { + + # clean up just in case + rm -f /var/run/radvd.pid + +} + +op=$1 +shift +$op $* diff --git a/radvd/radvd.rc.d b/radvd/radvd.rc.d new file mode 100644 index 0000000..971bc41 --- /dev/null +++ b/radvd/radvd.rc.d @@ -0,0 +1,37 @@ +#!/bin/bash + +. /etc/rc.conf +. /etc/rc.d/functions + +PID=`pidof -o %PPID /usr/sbin/radvd` +case "$1" in + start) + stat_busy "Starting radvd IPv6 RA/RS daemon" + if [ -z "$PID" ]; then + /usr/sbin/radvd + fi + if [ ! -z "$PID" -o $? -gt 0 ]; then + stat_fail + else + add_daemon radvd + stat_done + fi + ;; + stop) + stat_busy "Stopping radvd IPv6 RA/RS daemon" + [ ! -z "$PID" ] && kill $PID &>/dev/null + if [ $? -gt 0 ]; then + stat_fail + else + rm_daemon radvd + stat_done + fi + ;; + restart) + $0 stop + sleep 1 + $0 start + ;; + *) + echo "usage: $0 {start|stop|restart}" +esac |