summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Lutgens <blutgens@gentoo.org>2001-09-12 21:28:26 +0000
committerBen Lutgens <blutgens@gentoo.org>2001-09-12 21:28:26 +0000
commitb7b9da3a7c3bdb4851f44169ec63c1ca2fbdde62 (patch)
tree931aa5944c130e3d0d4f8e6fff3a329c74bd6553 /net-misc
parentnew incoming (diff)
downloadhistorical-b7b9da3a7c3bdb4851f44169ec63c1ca2fbdde62.tar.gz
historical-b7b9da3a7c3bdb4851f44169ec63c1ca2fbdde62.tar.bz2
historical-b7b9da3a7c3bdb4851f44169ec63c1ca2fbdde62.zip
portsentry, if you don't know what it is, you can read about it
http://www.psionic.com/abacus/portsentry/ there's a spiffy init script too.
Diffstat (limited to 'net-misc')
-rw-r--r--net-misc/portsentry/files/digest-portsentry-1.11
-rw-r--r--net-misc/portsentry/files/portsentry34
-rw-r--r--net-misc/portsentry/portsentry-1.1.ebuild54
3 files changed, 89 insertions, 0 deletions
diff --git a/net-misc/portsentry/files/digest-portsentry-1.1 b/net-misc/portsentry/files/digest-portsentry-1.1
new file mode 100644
index 000000000000..7ad5a8eae8e5
--- /dev/null
+++ b/net-misc/portsentry/files/digest-portsentry-1.1
@@ -0,0 +1 @@
+MD5 782839446b7eca554bb1880ef0882670 portsentry-1.1.tar.gz
diff --git a/net-misc/portsentry/files/portsentry b/net-misc/portsentry/files/portsentry
new file mode 100644
index 000000000000..4032c072b0d4
--- /dev/null
+++ b/net-misc/portsentry/files/portsentry
@@ -0,0 +1,34 @@
+#!/sbin/runscript
+SERVICE=portsentry
+opts="start stop restart"
+PIDFILE=/var/run/portsentry.pid
+EXE=/usr/sbin/portsentry
+
+# For more detailed and anal behavior read /usr/share/doc/portsentry-1.1/README.install
+# for what you can set this to
+OPT1="-tcp"
+OPT2="-udp"
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting $SERVICE (tcp)"
+ $EXE $OPT1
+ eend $?
+ ebegin "Starting $SERVICE (udp)"
+ $EXE $OPT2
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping $SERVICE"
+ killall -KILL $SERVICE 2>&1
+ eend $?
+}
+
+restart() {
+ stop
+ start
+}
diff --git a/net-misc/portsentry/portsentry-1.1.ebuild b/net-misc/portsentry/portsentry-1.1.ebuild
new file mode 100644
index 000000000000..abf500610997
--- /dev/null
+++ b/net-misc/portsentry/portsentry-1.1.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2001 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# Author Ben Lutgens <lamer@gentoo.org>
+# $Header: /var/cvsroot/gentoo-x86/net-misc/portsentry/portsentry-1.1.ebuild,v 1.1 2001/09/12 21:28:26 lamer Exp $
+
+S=${WORKDIR}/${P}
+DESCRIPTION="This is a sample skeleton ebuild file"
+SRC_URI="http://www.psionic.com/tools/${P}.tar.gz"
+HOMEPAGE="http://www.psionic.com/abacus/portsentry/"
+
+
+src_unpack() {
+ unpack ${A}
+ cd ${S}
+
+# Setting the portsentry.conf file location
+ cat portsentry_config.h | \
+ sed -e 's:^#define CONFIG_FILE "/usr/local/psionic/portsentry/portsentry.conf":#define CONFIG_FILE "/etc/portsentry/portsentry.conf":g' > portsentry_config.h
+
+# presetting the other file locations in portsentry.conf
+ cat portsentry.conf | sed -e \
+ 's:^IGNORE_FILE.*:IGNORE_FILE="/etc/portsentry/portsentry.ignore":g' -e \
+ 's:^HISTORY_FILE.*:HISTORY_FILE="/etc/portsentry/portsentry.history":g' -e \
+ 's:^BLOCKED_FILE.*:BLOCKED_FILE="/etc/portsentry/portsentry.blocked":g' \
+ > portsentry.conf
+
+ cat ignore.csh | sed -e "s:^set SENTRYDIR.*:set SENTRYDIR=/etc/portsentry:g" > ignore.csh
+
+}
+
+src_compile() {
+
+ make linux || die
+}
+
+src_install () {
+
+ exeinto /etc/init.d
+ doexe ${FILESDIR}/portsentry
+ dosbin portsentry ignore.csh
+ insinto /etc/portsentry
+ doins portsentry.{ignore,conf}
+ dodoc README* CHANGES LICENSE CREDITS
+
+}
+
+
+pkg_postinst() {
+ einfo "Please take a look at all the files in /etc/portsentry"
+ einfo "as they need to be customized before you can run portsentry!"
+ einfo "I can't stress enough to read the docs in /usr/share/doc/portsentry-1.1!"
+ einfo "There is some changes you may make to the initscript to make the protection"
+ einfo "more complete"
+}