aboutsummaryrefslogtreecommitdiffstats
path: root/testing/ipvsadm
diff options
context:
space:
mode:
authorFrancesco Colista <fcolista@alpinelinux.org>2014-04-22 09:33:51 +0000
committerFrancesco Colista <fcolista@alpinelinux.org>2014-04-22 09:33:58 +0000
commitfb5fc5d651b96d65aae460ea0b77738bbce01584 (patch)
treebb3a5a4abecfa45000eee47cb8563ed12705fc3f /testing/ipvsadm
parentdc279e271c4cfbb542b1b8667d833e76034ed85a (diff)
downloadaports-fb5fc5d651b96d65aae460ea0b77738bbce01584.tar.bz2
aports-fb5fc5d651b96d65aae460ea0b77738bbce01584.tar.xz
testing/ipvsadm: added initd
Diffstat (limited to 'testing/ipvsadm')
-rw-r--r--testing/ipvsadm/01-fix-not-showing-all-server.patch24
-rw-r--r--testing/ipvsadm/APKBUILD16
-rw-r--r--testing/ipvsadm/ipvsadm.initd38
3 files changed, 48 insertions, 30 deletions
diff --git a/testing/ipvsadm/01-fix-not-showing-all-server.patch b/testing/ipvsadm/01-fix-not-showing-all-server.patch
deleted file mode 100644
index 7af6b3c556..0000000000
--- a/testing/ipvsadm/01-fix-not-showing-all-server.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-diff -urN ipvsadm-1.26.vanilla/libipvs/ip_vs.h ipvsadm-1.26/libipvs/ip_vs.h
---- ipvsadm-1.26.vanilla/libipvs/ip_vs.h 2011-02-06 18:38:57.000000000 -0800
-+++ ipvsadm-1.26/libipvs/ip_vs.h 2011-08-23 15:03:59.000000000 -0700
-@@ -413,7 +413,7 @@
- __IPVS_CMD_ATTR_MAX,
- };
-
--#define IPVS_CMD_ATTR_MAX (__IPVS_SVC_ATTR_MAX - 1)
-+#define IPVS_CMD_ATTR_MAX (__IPVS_CMD_ATTR_MAX - 1)
-
- /*
- * Attributes used to describe a service
-diff -urN ipvsadm-1.26.vanilla/libipvs/ip_vs_nl_policy.c
-ipvsadm-1.26/libipvs/ip_vs_nl_policy.c
---- ipvsadm-1.26.vanilla/libipvs/ip_vs_nl_policy.c 2008-09-18
-08:57:37.000000000 -0700
-+++ ipvsadm-1.26/libipvs/ip_vs_nl_policy.c 2011-08-23 14:45:34.000000000 -0700
-@@ -26,6 +26,8 @@
- [IPVS_SVC_ATTR_TIMEOUT] = { .type = NLA_U32 },
- [IPVS_SVC_ATTR_NETMASK] = { .type = NLA_U32 },
- [IPVS_SVC_ATTR_STATS] = { .type = NLA_NESTED },
-+ [IPVS_SVC_ATTR_PE_NAME] = { .type = NLA_STRING,
-+ .maxlen = IP_VS_PENAME_MAXLEN},
- };
diff --git a/testing/ipvsadm/APKBUILD b/testing/ipvsadm/APKBUILD
index eb84649b0f..fdf3e3cd35 100644
--- a/testing/ipvsadm/APKBUILD
+++ b/testing/ipvsadm/APKBUILD
@@ -1,7 +1,7 @@
# Contributor: Leonardo Arena <rnalrd@gmail.com>
pkgname=ipvsadm
pkgver=1.27
-pkgrel=0
+pkgrel=1
pkgdesc="The IP Virtual Server administration utility"
url="http://www.linuxvirtualserver.org/software/ipvs.html"
arch="all"
@@ -11,7 +11,8 @@ depends_dev="libnl-dev popt-dev"
makedepends="$depends_dev"
install=
subpackages="$pkgname-doc"
-source="https://kernel.org/pub/linux/utils/kernel/ipvsadm/$pkgname-$pkgver.tar.xz"
+source="https://kernel.org/pub/linux/utils/kernel/ipvsadm/$pkgname-$pkgver.tar.xz
+ $pkgname.initd"
_builddir="$srcdir"/$pkgname-$pkgver
@@ -33,10 +34,13 @@ package() {
install
# remove the 2 lines below (and this) if there is no init.d script
- # install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
+ install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
# install -m644 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
}
-md5sums="9decaaaad2fd637ed06cffd954e66cf3 ipvsadm-1.27.tar.xz"
-sha256sums="d360fb4dcf591e0a8a918831e2c02b1dc03e3c17ee1e60d0d70de9455238b3f8 ipvsadm-1.27.tar.xz"
-sha512sums="cf982b7981674c91d1b7516de7b55cf378b306ce4a53e13976b8eeb8610015c4fa4aa9d251bc4d329db8e05c1862863160af2d3c63b76263f290087cffdf1b80 ipvsadm-1.27.tar.xz"
+md5sums="9decaaaad2fd637ed06cffd954e66cf3 ipvsadm-1.27.tar.xz
+f3e8df193ebf50e4161bee64d34d2fc5 ipvsadm.initd"
+sha256sums="d360fb4dcf591e0a8a918831e2c02b1dc03e3c17ee1e60d0d70de9455238b3f8 ipvsadm-1.27.tar.xz
+462cc0ee041a0ed2a3bcb8a0f84c0c04a9394d046ba0c2dcb8ca454575207cb9 ipvsadm.initd"
+sha512sums="cf982b7981674c91d1b7516de7b55cf378b306ce4a53e13976b8eeb8610015c4fa4aa9d251bc4d329db8e05c1862863160af2d3c63b76263f290087cffdf1b80 ipvsadm-1.27.tar.xz
+7e34e10a9bf975c2318605e9603ce2f2ab447563b7cfb6ef0cda2054ee5f73f97d5aa678cf43f9466ba2f6751a01e8830b85df9396ac973d4708472b275f476e ipvsadm.initd"
diff --git a/testing/ipvsadm/ipvsadm.initd b/testing/ipvsadm/ipvsadm.initd
new file mode 100644
index 0000000000..0e9399482e
--- /dev/null
+++ b/testing/ipvsadm/ipvsadm.initd
@@ -0,0 +1,38 @@
+#!/sbin/runscript
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-cluster/ipvsadm/files/ipvsadm-init,v 1.5 2011/12/04 10:40:20 swegener Exp $
+
+extra_commands="save"
+
+depend() {
+ need net
+}
+
+checkconfig() {
+ if [ ! -f /var/lib/ipvsadm/rules-save ] ; then
+ eerror "Not starting ipvsadm. First create some rules then run"
+ eerror "/etc/init.d/ipvsadm save"
+ return 1
+ fi
+}
+
+start() {
+ ebegin "Starting ipvsadm"
+ einfo "Clearing previous rules"
+ ipvsadm -C
+ ipvsadm-restore < /var/lib/ipvsadm/rules-save
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ipvsadm"
+ eend $?
+}
+
+save() {
+ ebegin "Saving ipvsadm state"
+ ipvsadm-save > /var/lib/ipvsadm/rules-save
+ eend $?
+}
+