summaryrefslogtreecommitdiff
path: root/community/ipvsadm
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2011-12-06 23:14:44 +0000
committerroot <root@rshg054.dnsready.net>2011-12-06 23:14:44 +0000
commitd1d87d2ac643e3dabc251f3cec7d3b00e29b282c (patch)
tree09d9025934fe06bd25753f98cf2eab3140456cc3 /community/ipvsadm
parent55d1e19e71b453a0f47c599f281a2ad2644247d2 (diff)
Tue Dec 6 23:14:44 UTC 2011
Diffstat (limited to 'community/ipvsadm')
-rw-r--r--community/ipvsadm/PKGBUILD40
-rw-r--r--community/ipvsadm/ipvsadm.conf3
-rw-r--r--community/ipvsadm/ipvsadm.rc39
-rw-r--r--community/ipvsadm/ipvsadm.rules1
4 files changed, 83 insertions, 0 deletions
diff --git a/community/ipvsadm/PKGBUILD b/community/ipvsadm/PKGBUILD
new file mode 100644
index 000000000..b197164c0
--- /dev/null
+++ b/community/ipvsadm/PKGBUILD
@@ -0,0 +1,40 @@
+# $Id$
+# Maintainer: Sebastien Luttringer <seblu+arch@seblu.net>
+# Contributor: Judd Vinet <jvinet@zeroflux.org>
+
+pkgname=ipvsadm
+pkgver=1.26
+pkgrel=1
+pkgdesc='The IP Virtual Server administration utility'
+arch=('i686' 'x86_64')
+url='http://www.linuxvirtualserver.org/software/ipvs.html'
+license=('GPL2')
+depends=('libnl' 'popt')
+backup=('etc/conf.d/ipvsadm')
+#options=('!makeflags')
+source=("http://www.linuxvirtualserver.org/software/kernel-2.6/$pkgname-$pkgver.tar.gz"
+ 'ipvsadm.rc'
+ 'ipvsadm.conf'
+ 'ipvsadm.rules')
+md5sums=('eac3ba3f62cd4dea2da353aeddd353a8'
+ '0e106fce0675e014bea0f9355b947bd6'
+ 'cd358130967a9cc0d31fc61282df43e7'
+ 'cd6649c647e495d4d6f981542ce5a93b')
+
+build() {
+ cd ${pkgname}-${pkgver}
+ make INCLUDE="-I/usr/src/linux-`uname -r`/include -I.. -I." || return 1
+}
+
+package() {
+ cd ${pkgname}-${pkgver}
+ make BUILD_ROOT=${pkgdir} MANDIR=usr/share/man INIT="$pkgdir/etc/rc.d" install
+ cd "$srcdir"
+ # add initscripts
+ install -D -m 755 $pkgname.rc "${pkgdir}/etc/rc.d/$pkgname"
+ install -D -m 644 $pkgname.conf "${pkgdir}/etc/conf.d/$pkgname"
+ # add ipvsadm rules
+ install -D -m 644 $pkgname.rules "${pkgdir}/etc/$pkgname.rules"
+}
+
+# vim:set ts=2 sw=2 ft=sh et:
diff --git a/community/ipvsadm/ipvsadm.conf b/community/ipvsadm/ipvsadm.conf
new file mode 100644
index 000000000..aac7ba729
--- /dev/null
+++ b/community/ipvsadm/ipvsadm.conf
@@ -0,0 +1,3 @@
+# vim:set ts=2 sw=2 ft=sh et:
+
+IPVSADM_CONF='/etc/ipvsadm.rules'
diff --git a/community/ipvsadm/ipvsadm.rc b/community/ipvsadm/ipvsadm.rc
new file mode 100644
index 000000000..91ed32e3b
--- /dev/null
+++ b/community/ipvsadm/ipvsadm.rc
@@ -0,0 +1,39 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+. /etc/conf.d/ipvsadm
+
+case "$1" in
+ start)
+ stat_busy 'Loading IPVS table'
+ if [[ -f $IPVSADM_CONF ]] && /sbin/ipvsadm-restore < "$IPVSADM_CONF"; then
+ add_daemon ipvsadm
+ stat_done
+ else
+ stat_fail
+ fi
+ ;;
+ stop)
+ status 'Clearing IPVS table' /sbin/ipvsadm -C
+ rm_daemon ipvsadm
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ save)
+ stat_busy 'Saving IPVS table'
+ if /sbin/ipvsadm-save -n > "$IPVSADM_CONF" 2>/dev/null; then
+ stat_done
+ else
+ stat_fail
+ fi
+ ;;
+ *)
+ echo "usage: ${0##*/} {start|stop|restart|save}"
+esac
+exit 0
+
+# vim:set ts=2 sw=2 ft=sh et:
diff --git a/community/ipvsadm/ipvsadm.rules b/community/ipvsadm/ipvsadm.rules
new file mode 100644
index 000000000..6740463a1
--- /dev/null
+++ b/community/ipvsadm/ipvsadm.rules
@@ -0,0 +1 @@
+# emtpy rules file for ipvsadm