summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAron Griffis <agriffis@gentoo.org>2001-09-16 19:14:30 +0000
committerAron Griffis <agriffis@gentoo.org>2001-09-16 19:14:30 +0000
commitbc9684638d7485d6667d2721429daf68008589de (patch)
tree24d188cc36761a6a563ea9d5c62b472bb00d5706 /net-nds
parentfixo for su man page zappification (diff)
downloadgentoo-2-bc9684638d7485d6667d2721429daf68008589de.tar.gz
gentoo-2-bc9684638d7485d6667d2721429daf68008589de.tar.bz2
gentoo-2-bc9684638d7485d6667d2721429daf68008589de.zip
Updated to new init.d system.
Added pmap_dump/pmap_set calls to restart()
Diffstat (limited to 'net-nds')
-rw-r--r--net-nds/portmap/files/portmap-5b-r639
-rw-r--r--net-nds/portmap/portmap-5b-r6.ebuild38
2 files changed, 77 insertions, 0 deletions
diff --git a/net-nds/portmap/files/portmap-5b-r6 b/net-nds/portmap/files/portmap-5b-r6
new file mode 100644
index 000000000000..4282b86b7bb3
--- /dev/null
+++ b/net-nds/portmap/files/portmap-5b-r6
@@ -0,0 +1,39 @@
+#!/sbin/runscript
+
+SERVICE=portmap
+EXE=/sbin/portmap
+opts="start stop restart"
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting ${SERVICE}"
+ start-stop-daemon --start --quiet --exec $EXE 1>&2
+ eend $? "Error starting ${SERVICE}."
+}
+
+stop() {
+ ebegin "Stopping ${SERVICE}"
+ start-stop-daemon --stop --quiet --exec $EXE 1>&2
+ eend $? "Error stopping ${SERVICE}."
+}
+
+restart() {
+ # Dump the portmapper's table before stopping
+ ebegin "Saving portmap table"
+ local tmpfile=`mktemp /tmp/pmap_table.XXXXXX`
+ [ -n "$tmpfile" ] && pmap_dump >$tmpfile
+ eend $? "Error saving portmap table."
+ # Stop and restart portmapper
+ stop
+ start
+ # Reload the portmapper's table
+ if [ -n "$tmpfile" ]; then
+ ebegin "Reloading portmap table"
+ pmap_set <$tmpfile
+ eend $? "Error reloading portmap table."
+ rm -f $tmpfile
+ fi
+}
diff --git a/net-nds/portmap/portmap-5b-r6.ebuild b/net-nds/portmap/portmap-5b-r6.ebuild
new file mode 100644
index 000000000000..b67c2faa8131
--- /dev/null
+++ b/net-nds/portmap/portmap-5b-r6.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2000 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# Author Achim Gottinger <achim@gentoo.org>
+# $Header: /var/cvsroot/gentoo-x86/net-nds/portmap/portmap-5b-r6.ebuild,v 1.1 2001/09/16 19:14:30 agriffis Exp $
+
+P=portmap-5b
+A=portmap_5beta.tar.gz
+A0=portmap_5beta.dif
+S=$WORKDIR/portmap_5beta
+DESCRIPTION="Netkit - portmapper"
+SRC_URI="ftp://ftp.porcupine.org/pub/security/$A"
+HOMEPAGE="ftp://ftp.porcupine.org/pub/security/index.html"
+
+DEPEND="virtual/glibc
+ sys-apps/tcp-wrappers"
+
+src_unpack() {
+ unpack $A
+ cd $S || die
+ patch -p0 < $FILESDIR/$A0 || die
+ cp Makefile Makefile.orig
+ sed -e "s/-O2/$CFLAGS/" Makefile.orig > Makefile || die
+}
+
+src_compile() {
+ make || die
+}
+
+src_install() {
+ mkdir -p $D/sbin $D/usr/sbin $D/usr/share/man/man8
+ mkdir -p $D/etc/init.d $D/etc/runlevels/default
+ install -m755 portmap $D/sbin
+ install -m755 pmap_dump pmap_set $D/usr/sbin
+ install -m644 portmap.8 pmap_dump.8 pmap_set.8 $D/usr/share/man/man8
+ install -m755 $FILESDIR/portmap-$PVR $D/etc/init.d/portmap
+ ln -s ../../init.d/portmap $D/etc/runlevels/default/portmap
+ dodoc BLURB CHANGES README
+}