summaryrefslogtreecommitdiff
path: root/community-staging
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-02-10 23:15:14 +0000
committerroot <root@rshg054.dnsready.net>2012-02-10 23:15:14 +0000
commit9d1489b877a1fa7c2674cf1f744804db42d93bfc (patch)
tree33f1f96e0a8a2cc9a6a2939dfa0517a2ea47dcce /community-staging
parent4bc61018eec54dbe50e7556ce01d2ef2859b2c9f (diff)
Fri Feb 10 23:15:14 UTC 2012
Diffstat (limited to 'community-staging')
-rw-r--r--community-staging/ipvsadm/PKGBUILD40
-rw-r--r--community-staging/ipvsadm/ipvsadm.conf3
-rw-r--r--community-staging/ipvsadm/ipvsadm.rc39
-rw-r--r--community-staging/ipvsadm/ipvsadm.rules1
-rw-r--r--community-staging/keepalived/PKGBUILD45
-rw-r--r--community-staging/keepalived/ip_vs_moved.patch23
-rw-r--r--community-staging/keepalived/keepalived.conf16
-rw-r--r--community-staging/keepalived/keepalived.rc39
8 files changed, 206 insertions, 0 deletions
diff --git a/community-staging/ipvsadm/PKGBUILD b/community-staging/ipvsadm/PKGBUILD
new file mode 100644
index 000000000..407487a23
--- /dev/null
+++ b/community-staging/ipvsadm/PKGBUILD
@@ -0,0 +1,40 @@
+# $Id$
+# Maintainer: Sébastien Luttringer <seblu@aur.archlinux.org>
+# Contributor: Judd Vinet <jvinet@zeroflux.org>
+
+pkgname=ipvsadm
+pkgver=1.26
+pkgrel=2
+pkgdesc='The IP Virtual Server administration utility'
+arch=('i686' 'x86_64')
+url='http://www.linuxvirtualserver.org/software/ipvs.html'
+license=('GPL2')
+depends=('libnl1' '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-staging/ipvsadm/ipvsadm.conf b/community-staging/ipvsadm/ipvsadm.conf
new file mode 100644
index 000000000..aac7ba729
--- /dev/null
+++ b/community-staging/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-staging/ipvsadm/ipvsadm.rc b/community-staging/ipvsadm/ipvsadm.rc
new file mode 100644
index 000000000..91ed32e3b
--- /dev/null
+++ b/community-staging/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-staging/ipvsadm/ipvsadm.rules b/community-staging/ipvsadm/ipvsadm.rules
new file mode 100644
index 000000000..6740463a1
--- /dev/null
+++ b/community-staging/ipvsadm/ipvsadm.rules
@@ -0,0 +1 @@
+# emtpy rules file for ipvsadm
diff --git a/community-staging/keepalived/PKGBUILD b/community-staging/keepalived/PKGBUILD
new file mode 100644
index 000000000..ad7fa29f4
--- /dev/null
+++ b/community-staging/keepalived/PKGBUILD
@@ -0,0 +1,45 @@
+# $Id$
+# Maintainer: Sébastien Luttringer <seblu@aur.archlinux.org>
+# Contributor: Andrea Zucchelli <zukka77@gmail.com>
+
+pkgname=keepalived
+pkgver=1.2.2
+pkgrel=3
+pkgdesc='Failover and monitoring daemon for LVS clusters'
+arch=('i686' 'x86_64')
+url='http://www.keepalived.org/'
+license=('GPL2')
+backup=('etc/keepalived/keepalived.conf' 'etc/conf.d/keepalived')
+depends=('openssl' 'popt' 'libnl1')
+source=("http://www.keepalived.org/software/$pkgname-$pkgver.tar.gz"
+ 'keepalived.rc'
+ 'keepalived.conf'
+ 'ip_vs_moved.patch')
+md5sums=('f68327ca142616a8463d2d105db122cd'
+ 'baeb62a682c2b59d732cea84bf52cc87'
+ '9c8142da8730ad27a345587dea83ced7'
+ '87ee19c85adaedd3eb11bea8a5865d47')
+
+build() {
+ cd $pkgname-$pkgver
+ patch -p1 -i ../ip_vs_moved.patch
+ ./configure --prefix=/usr --sysconfdir=/etc
+ make
+}
+
+package() {
+ cd $pkgname-$pkgver
+ make DESTDIR="$pkgdir" install
+ # clean pacakge init scripts
+ rm -r "$pkgdir/etc/rc.d/init.d" "$pkgdir/etc/sysconfig"
+ # move examples to /usr/share
+ install -d -m 755 "$pkgdir/usr/share/$pkgname"
+ mv "$pkgdir/etc/keepalived/samples" "$pkgdir/usr/share/$pkgname/samples"
+
+ # add initscripts
+ install -D -m 755 ../$pkgname.rc "${pkgdir}/etc/rc.d/$pkgname"
+ install -D -m 644 ../$pkgname.conf "${pkgdir}/etc/conf.d/$pkgname"
+
+}
+
+# vim:set ts=2 sw=2 ft=sh et:
diff --git a/community-staging/keepalived/ip_vs_moved.patch b/community-staging/keepalived/ip_vs_moved.patch
new file mode 100644
index 000000000..e27873810
--- /dev/null
+++ b/community-staging/keepalived/ip_vs_moved.patch
@@ -0,0 +1,23 @@
+--- keepalived-1.2.2/configure 2011-01-06 01:51:33.000000000 +0100
++++ keepalived-1.2.2.orig/configure 2011-11-24 19:36:32.051486626 +0100
+@@ -3973,7 +3973,7 @@
+
+ IPVS_SUPPORT="_WITHOUT_LVS_"
+ if test "$enable_lvs" != "no"; then
+- ac_fn_c_check_header_mongrel "$LINENO" "net/ip_vs.h" "ac_cv_header_net_ip_vs_h" "$ac_includes_default"
++ ac_fn_c_check_header_mongrel "$LINENO" "linux/ip_vs.h" "ac_cv_header_net_ip_vs_h" "$ac_includes_default"
+ if test "x$ac_cv_header_net_ip_vs_h" = x""yes; then :
+ IPVS_SUPPORT="_WITH_LVS_"
+ else
+diff -ru keepalived-1.2.2/configure.in keepalived-1.2.2.orig/configure.in
+--- keepalived-1.2.2/configure.in 2011-01-06 01:51:30.000000000 +0100
++++ keepalived-1.2.2.orig/configure.in 2011-11-24 19:36:11.797860077 +0100
+@@ -124,7 +124,7 @@
+ dnl ----[ Checks for LVS and VRRP support ]----
+ IPVS_SUPPORT="_WITHOUT_LVS_"
+ if test "$enable_lvs" != "no"; then
+- AC_CHECK_HEADER([net/ip_vs.h],
++ AC_CHECK_HEADER([linux/ip_vs.h],
+ [IPVS_SUPPORT="_WITH_LVS_"],
+ [
+ IPVS_SUPPORT="_WITHOUT_LVS_"
diff --git a/community-staging/keepalived/keepalived.conf b/community-staging/keepalived/keepalived.conf
new file mode 100644
index 000000000..225f02bf9
--- /dev/null
+++ b/community-staging/keepalived/keepalived.conf
@@ -0,0 +1,16 @@
+# vim:set ts=2 sw=2 ft=sh et:
+# Options for keepalived. See `keepalived --help' output and keepalived(8) and
+# keepalived.conf(5) man pages for a list of all options. Here are the most
+# common ones :
+#
+# --vrrp -P Only run with VRRP subsystem.
+# --check -C Only run with Health-checker subsystem.
+# --dont-release-vrrp -V Dont remove VRRP VIPs & VROUTEs on daemon stop.
+# --dont-release-ipvs -I Dont remove IPVS topology on daemon stop.
+# --dump-conf -d Dump the configuration data.
+# --log-detail -D Detailed log messages.
+# --log-facility -S 0-7 Set local syslog facility (default=LOG_DAEMON)
+#
+
+DAEMON_OPTS='-D'
+
diff --git a/community-staging/keepalived/keepalived.rc b/community-staging/keepalived/keepalived.rc
new file mode 100644
index 000000000..88bb90724
--- /dev/null
+++ b/community-staging/keepalived/keepalived.rc
@@ -0,0 +1,39 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+. /etc/conf.d/${0##*/}
+
+NAME=keepalived
+DAEMON=/usr/sbin/keepalived
+PID=$(pidof -o %PPID $DAEMON)
+
+case "$1" in
+ start)
+ stat_busy "Starting $NAME daemon"
+ [[ ! $PID ]] && $DAEMON $DAEMON_OPTS && add_daemon $NAME && stat_done && exit 0
+ stat_fail
+ ;;
+ stop)
+ stat_busy "Stopping $NAME daemon"
+ [[ $PID ]] && kill $PID &> /dev/null && rm_daemon $NAME && stat_done && exit 0
+ stat_fail
+ ;;
+ restart)
+ $0 stop
+ $0 start
+ exit 0
+ ;;
+ reload)
+ stat_busy "Reloading $NAME daemon"
+ [[ $PID ]] && kill -HUP $PID &> /dev/null && stat_done && exit 0
+ stat_fail
+ ;;
+ *)
+ echo "usage: ${0##*/} {start|stop|restart|reload}" >&2
+ ;;
+esac
+
+exit 1
+
+# vim:set ts=2 sw=2 ft=sh noet: