summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonny Davies <woodchip@gentoo.org>2001-10-17 16:07:11 +0000
committerDonny Davies <woodchip@gentoo.org>2001-10-17 16:07:11 +0000
commit04ebb4159dd26f29faf2306387c04ae7c6f803a5 (patch)
tree797d02d823f5832187d8f08b66eefa1faf65e5f0 /net-misc
parentanother update :) (diff)
downloadgentoo-2-04ebb4159dd26f29faf2306387c04ae7c6f803a5.tar.gz
gentoo-2-04ebb4159dd26f29faf2306387c04ae7c6f803a5.tar.bz2
gentoo-2-04ebb4159dd26f29faf2306387c04ae7c6f803a5.zip
rc5/rc6 support. cleanup the rc6 initscript. fixup config file install.
Diffstat (limited to 'net-misc')
-rw-r--r--net-misc/portsentry/files/digest-portsentry-1.1-r61
-rw-r--r--net-misc/portsentry/files/portsentry.rc5 (renamed from net-misc/portsentry/files/portsentry)0
-rw-r--r--net-misc/portsentry/files/portsentry.rc637
-rw-r--r--net-misc/portsentry/portsentry-1.1-r6.ebuild49
-rw-r--r--net-misc/portsentry/portsentry-1.1.ebuild57
5 files changed, 113 insertions, 31 deletions
diff --git a/net-misc/portsentry/files/digest-portsentry-1.1-r6 b/net-misc/portsentry/files/digest-portsentry-1.1-r6
new file mode 100644
index 000000000000..7ad5a8eae8e5
--- /dev/null
+++ b/net-misc/portsentry/files/digest-portsentry-1.1-r6
@@ -0,0 +1 @@
+MD5 782839446b7eca554bb1880ef0882670 portsentry-1.1.tar.gz
diff --git a/net-misc/portsentry/files/portsentry b/net-misc/portsentry/files/portsentry.rc5
index 4032c072b0d4..4032c072b0d4 100644
--- a/net-misc/portsentry/files/portsentry
+++ b/net-misc/portsentry/files/portsentry.rc5
diff --git a/net-misc/portsentry/files/portsentry.rc6 b/net-misc/portsentry/files/portsentry.rc6
new file mode 100644
index 000000000000..d1c77e50ec3a
--- /dev/null
+++ b/net-misc/portsentry/files/portsentry.rc6
@@ -0,0 +1,37 @@
+#!/sbin/runscript
+
+#you can put this in your rc.conf file if you wish
+#PORTSENTRY_MODES="udp tcp stcp atcp sudp audp"
+
+depend() {
+ need net
+}
+
+checkconfig() {
+ if [ ! -e /etc/portsentry/portsentry.conf ] ; then
+ eerror "You need an /etc/portsentry/portsentry.conf file"
+ eerror "There is a sample in /usr/share/doc/portsentry"
+ return 1
+ fi
+ if [ -z "$PORTSENTRY_MODES" ] ; then
+ eerror "You need to setup your PORTSENTRY_MODES first"
+ eerror "Check that you've enabled some or all of them"
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting portsentry"
+ for mode in $PORTSENTRY_MODES ; do
+ /usr/bin/portsentry -$mode
+ result=$(( $result + $? ))
+ done
+ eend $result
+}
+
+stop() {
+ ebegin "Stopping portsentry"
+ killall portsentry
+ eend $?
+}
diff --git a/net-misc/portsentry/portsentry-1.1-r6.ebuild b/net-misc/portsentry/portsentry-1.1-r6.ebuild
new file mode 100644
index 000000000000..cb0c683f9076
--- /dev/null
+++ b/net-misc/portsentry/portsentry-1.1-r6.ebuild
@@ -0,0 +1,49 @@
+# 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-r6.ebuild,v 1.1 2001/10/17 16:07:11 woodchip Exp $
+
+DESCRIPTION="Automated port scan detector and response tool"
+HOMEPAGE="http://www.psionic.com/abacus/portsentry/"
+
+SRC_URI="http://www.psionic.com/tools/${P}.tar.gz"
+S=${WORKDIR}/${P}
+
+DEPEND="virtual/glibc"
+
+src_unpack() {
+
+ unpack ${A} ; cd ${S}
+
+ # Setting the portsentry.conf file location
+ sed -e 's:/usr/local/psionic/portsentry/portsentry.conf:/etc/portsentry/portsentry.conf:' \
+ portsentry_config.h | cat > portsentry_config.h
+
+ # presetting the other file locations in 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 > portsentry.conf
+
+ sed -e "s:^set SENTRYDIR.*:set SENTRYDIR=/etc/portsentry:g" \
+ ignore.csh | cat > ignore.csh
+}
+
+src_compile() {
+
+ make CFLAGS="${CFLAGS}" linux || die
+}
+
+src_install () {
+
+ dobin portsentry ignore.csh
+ dodoc README* CHANGES LICENSE CREDITS
+ newdoc portsentry.ignore portsentry.ignore.sample
+ newdoc portsentry.conf portsentry.conf.sample
+
+ insinto /etc/portsentry
+ newins portsentry.ignore portsentry.ignore.sample
+ newins portsentry.conf portsentry.conf.sample
+
+ exeinto /etc/init.d ; newexe ${FILESDIR}/portsentry.rc6 portsentry
+}
diff --git a/net-misc/portsentry/portsentry-1.1.ebuild b/net-misc/portsentry/portsentry-1.1.ebuild
index 3e01b69f9ada..b8c9ec289c70 100644
--- a/net-misc/portsentry/portsentry-1.1.ebuild
+++ b/net-misc/portsentry/portsentry-1.1.ebuild
@@ -1,54 +1,49 @@
# 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.2 2001/09/13 00:09:53 lamer Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/portsentry/portsentry-1.1.ebuild,v 1.3 2001/10/17 16:07:11 woodchip Exp $
-S=${WORKDIR}/${P}
-DESCRIPTION="This is a sample skeleton ebuild file"
-SRC_URI="http://www.psionic.com/tools/${P}.tar.gz"
+DESCRIPTION="Automated port scan detector and response tool"
HOMEPAGE="http://www.psionic.com/abacus/portsentry/"
+SRC_URI="http://www.psionic.com/tools/${P}.tar.gz"
+S=${WORKDIR}/${P}
+
+DEPEND="virtual/glibc"
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
+ unpack ${A} ; cd ${S}
-# 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
+ # Setting the portsentry.conf file location
+ sed -e 's:/usr/local/psionic/portsentry/portsentry.conf:/etc/portsentry/portsentry.conf:' \
+ portsentry_config.h | cat > portsentry_config.h
- cat ignore.csh | sed -e "s:^set SENTRYDIR.*:set SENTRYDIR=/etc/portsentry:g" > ignore.csh
+ # presetting the other file locations in 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 > portsentry.conf
+ sed -e "s:^set SENTRYDIR.*:set SENTRYDIR=/etc/portsentry:g" \
+ ignore.csh | cat > ignore.csh
}
src_compile() {
-
- make linux || die
+
+ make CFLAGS="${CFLAGS}" linux || die
}
src_install () {
- exeinto /etc/init.d
- doexe ${FILESDIR}/portsentry
dobin portsentry ignore.csh
- insinto /etc/portsentry
- doins portsentry.{ignore,conf}
- dodoc README* CHANGES LICENSE CREDITS
-
-}
+ dodoc README* CHANGES LICENSE CREDITS
+ newdoc portsentry.ignore portsentry.ignore.sample
+ newdoc portsentry.conf portsentry.conf.sample
+ insinto /etc/portsentry
+ newins portsentry.ignore portsentry.ignore.sample
+ newins portsentry.conf portsentry.conf.sample
-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"
+ exeinto /etc/rc.d/init.d ; newexe ${FILESDIR}/portsentry.rc5 portsentry
}