diff options
author | Donny Davies <woodchip@gentoo.org> | 2001-09-25 01:48:41 +0000 |
---|---|---|
committer | Donny Davies <woodchip@gentoo.org> | 2001-09-25 01:48:41 +0000 |
commit | 806efd43e2e4975fe8479434f2a4b73311c2ed7f (patch) | |
tree | 76e505bb8d88194ee457de34be38036279f75b00 /net-nds | |
parent | rc5/rc6 support for net-nds/portmap (diff) | |
download | gentoo-2-806efd43e2e4975fe8479434f2a4b73311c2ed7f.tar.gz gentoo-2-806efd43e2e4975fe8479434f2a4b73311c2ed7f.tar.bz2 gentoo-2-806efd43e2e4975fe8479434f2a4b73311c2ed7f.zip |
cleanups of the rc6 ebuild and initscript
Diffstat (limited to 'net-nds')
-rw-r--r-- | net-nds/portmap/files/portmap-5b-r6 | 39 | ||||
-rw-r--r--[-rwxr-xr-x] | net-nds/portmap/files/portmap.rc5 (renamed from net-nds/portmap/files/portmap) | 0 | ||||
-rw-r--r-- | net-nds/portmap/files/portmap.rc6 | 39 | ||||
-rw-r--r-- | net-nds/portmap/portmap-5b-r1.ebuild | 47 | ||||
-rw-r--r-- | net-nds/portmap/portmap-5b-r6.ebuild | 19 |
5 files changed, 70 insertions, 74 deletions
diff --git a/net-nds/portmap/files/portmap-5b-r6 b/net-nds/portmap/files/portmap-5b-r6 deleted file mode 100644 index 4282b86b7bb3..000000000000 --- a/net-nds/portmap/files/portmap-5b-r6 +++ /dev/null @@ -1,39 +0,0 @@ -#!/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/files/portmap b/net-nds/portmap/files/portmap.rc5 index 2be2a499eea5..2be2a499eea5 100755..100644 --- a/net-nds/portmap/files/portmap +++ b/net-nds/portmap/files/portmap.rc5 diff --git a/net-nds/portmap/files/portmap.rc6 b/net-nds/portmap/files/portmap.rc6 new file mode 100644 index 000000000000..047051271ddb --- /dev/null +++ b/net-nds/portmap/files/portmap.rc6 @@ -0,0 +1,39 @@ +#!/sbin/runscript + +opts="start stop restart" + +depend() { + need net +} + +start() { + ebegin "Starting portmap" + start-stop-daemon --start --quiet --exec /sbin/portmap + eend $? +} + +stop() { + ebegin "Stopping portmap" + start-stop-daemon --stop --quiet --exec /sbin/portmap + eend $? +} + +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-r1.ebuild b/net-nds/portmap/portmap-5b-r1.ebuild index aede6ef9804e..1ef55c4f7eeb 100644 --- a/net-nds/portmap/portmap-5b-r1.ebuild +++ b/net-nds/portmap/portmap-5b-r1.ebuild @@ -1,48 +1,41 @@ # 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-r1.ebuild,v 1.6 2001/09/04 21:26:57 lamer Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-nds/portmap/portmap-5b-r1.ebuild,v 1.7 2001/09/25 01:48:41 woodchip Exp $ P=portmap-5b A=portmap_5beta.tar.gz A0=portmap_5beta.dif -S=${WORKDIR}/portmap_5beta +S=$WORKDIR/portmap_5beta DESCRIPTION="Netkit - portmapper" -SRC_URI="ftp://ftp.porcupine.org/pub/security/"${A} +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_compile() { - try make -} +DEPEND="virtual/glibc + sys-apps/tcp-wrappers" src_unpack() { - unpack ${A} - cd ${S} - patch -p0 < ${O}/files/${A0} + unpack $A + cd $S || die + patch -p0 < $FILESDIR/$A0 || die cp Makefile Makefile.orig - sed -e "s/-O2/${CFLAGS}/" Makefile.orig > Makefile + sed -e "s/-O2/$CFLAGS/" Makefile.orig > Makefile || die } -src_install() { - - cd ${S} - into / - dosbin portmap - into /usr - dosbin pmap_dump pmap_set - doman portmap.8 pmap_dump.8 pmap_set.8 - insinto /etc/rc.d/init.d - doins ${FILESDIR}/portmap - dodoc BLURB CHANGES README +src_compile() { + make || die } -pkg_config() { +src_install() { + into / ; dosbin portmap + into /usr ; dosbin pmap_dump pmap_set + doman portmap.8 pmap_dump.8 pmap_set.8 - source ${ROOT}/etc/rc.d/config/functions + exeinto /etc/rc.d/init.d + newexe ${FILESDIR}/portmap.rc5 portmap - einfo "Generating symlinks..." - ${ROOT}/usr/sbin/rc-update add portmap + # is this really the sort of thing we wanna be doing? :) + # ln -s ../../init.d/portmap $D/etc/runlevels/default/portmap + dodoc BLURB CHANGES README } diff --git a/net-nds/portmap/portmap-5b-r6.ebuild b/net-nds/portmap/portmap-5b-r6.ebuild index b67c2faa8131..b7af0c319a87 100644 --- a/net-nds/portmap/portmap-5b-r6.ebuild +++ b/net-nds/portmap/portmap-5b-r6.ebuild @@ -1,7 +1,7 @@ # 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 $ +# $Header: /var/cvsroot/gentoo-x86/net-nds/portmap/portmap-5b-r6.ebuild,v 1.2 2001/09/25 01:48:41 woodchip Exp $ P=portmap-5b A=portmap_5beta.tar.gz @@ -27,12 +27,15 @@ src_compile() { } 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 + into / ; dosbin portmap + into /usr ; dosbin pmap_dump pmap_set + doman portmap.8 pmap_dump.8 pmap_set.8 + + exeinto /etc/init.d + newexe ${FILESDIR}/portmap.rc6 portmap + + # is this really the sort of thing we wanna be doing? :) + # ln -s ../../init.d/portmap $D/etc/runlevels/default/portmap + dodoc BLURB CHANGES README } |