diff options
author | Brian Jackson <iggy@gentoo.org> | 2003-11-12 22:01:36 +0000 |
---|---|---|
committer | Brian Jackson <iggy@gentoo.org> | 2003-11-12 22:01:36 +0000 |
commit | 4123e70cbb7fc72c660eca5919f9e825372abe09 (patch) | |
tree | 1319ae58c4045bf0f785c97096c35193ee29a321 /sys-cluster | |
parent | add init script, fixes 32906 (diff) | |
download | historical-4123e70cbb7fc72c660eca5919f9e825372abe09.tar.gz historical-4123e70cbb7fc72c660eca5919f9e825372abe09.tar.bz2 historical-4123e70cbb7fc72c660eca5919f9e825372abe09.zip |
add init script, fixes 32906
Diffstat (limited to 'sys-cluster')
-rw-r--r-- | sys-cluster/ipvsadm/Manifest | 6 | ||||
-rw-r--r-- | sys-cluster/ipvsadm/files/ipvsadm-init | 35 | ||||
-rw-r--r-- | sys-cluster/ipvsadm/ipvsadm-1.21.ebuild | 9 |
3 files changed, 42 insertions, 8 deletions
diff --git a/sys-cluster/ipvsadm/Manifest b/sys-cluster/ipvsadm/Manifest index 6ba110eeeec1..282c34dcfe52 100644 --- a/sys-cluster/ipvsadm/Manifest +++ b/sys-cluster/ipvsadm/Manifest @@ -1,5 +1,5 @@ -MD5 f9c194a358797b37488533ef64d48889 ipvsadm-1.21.ebuild 925 -MD5 65fa212409fa4b01dd7dd0b43bf1df60 ChangeLog 693 +MD5 7a61eba73717e411a72587f840debcf9 ipvsadm-1.21.ebuild 947 +MD5 4208e656efb46f4e90971c23637200fc ChangeLog 887 MD5 61203435ed5dc50e2259e1df1322b779 metadata.xml 411 MD5 4701a5d41fbd71b84a132051fba6a024 files/digest-ipvsadm-1.21 63 -MD5 d41d8cd98f00b204e9800998ecf8427e files/ipvsadm-init 0 +MD5 55b06899eaaeda665fec6a32e3584bed files/ipvsadm-init 747 diff --git a/sys-cluster/ipvsadm/files/ipvsadm-init b/sys-cluster/ipvsadm/files/ipvsadm-init new file mode 100644 index 000000000000..a4f821a384cb --- /dev/null +++ b/sys-cluster/ipvsadm/files/ipvsadm-init @@ -0,0 +1,35 @@ +#!/sbin/runscript +# Copyright 1999-2003 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/ipvsadm/files/ipvsadm-init,v 1.1 2003/11/12 22:01:27 iggy Exp $ + +depend() { + need net +} + +checkconfig() { + if [ ! -f /var/lib/ipvsadm/rules-save ] ; then + eerror "Not starting iptables. First create some rules then run" + eerror "/etc/init.d/iptables 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 $? +} diff --git a/sys-cluster/ipvsadm/ipvsadm-1.21.ebuild b/sys-cluster/ipvsadm/ipvsadm-1.21.ebuild index 46815d44c0de..324490af0443 100644 --- a/sys-cluster/ipvsadm/ipvsadm-1.21.ebuild +++ b/sys-cluster/ipvsadm/ipvsadm-1.21.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-cluster/ipvsadm/ipvsadm-1.21.ebuild,v 1.4 2003/09/06 22:05:25 msterret Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/ipvsadm/ipvsadm-1.21.ebuild,v 1.5 2003/11/12 22:01:27 iggy Exp $ DESCRIPTION="ipvsadm is a utility to administer the IP virtual server services offered by the Linux kernel with IP virtual server support." @@ -21,7 +21,6 @@ src_compile() { } src_install() { - into / dosbin ipvsadm dosbin ipvsadm-save @@ -32,8 +31,8 @@ src_install() { doman ipvsadm-restore.8 exeinto /etc/init.d - doexe ipvsadm - - einfo "" + newbin ${FILESDIR}/ipvsadm-init ipvsadm + keepdir /var/lib/ipvsadm + einfo "You will need a kernel that has ipvs patches to use LVS" } |