- Add (non-rcNG) startup-script (patches welcome)
- Cleanup port (me) PR: ports/72759 Submitted by: Alex de Kruijff
This commit is contained in:
parent
a9cf7529a0
commit
e4c5d5f26a
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=133580
@ -14,17 +14,21 @@ MASTER_SITE_SUBDIR= UNIX/IDS
|
||||
MAINTAINER= ports@FreeBSD.org
|
||||
COMMENT= Port scan detection and active defense
|
||||
|
||||
SUB_FILES= portsentry.sh
|
||||
ALL_TARGET= freebsd
|
||||
USE_REINPLACE= yes
|
||||
CFLAGS+= -DPREFIX=\"${PREFIX}\"
|
||||
MAKE_ARGS= CC="${CC}" CFLAGS="${CFLAGS}"
|
||||
|
||||
post-patch:
|
||||
@${REINPLACE_CMD} -e 's,__PREFIX__,${PREFIX},g' \
|
||||
@${REINPLACE_CMD} -e 's,/usr/local/psionic/portsentry,${PREFIX}/etc,g' \
|
||||
${WRKSRC}/portsentry.conf ${WRKSRC}/portsentry_config.h
|
||||
|
||||
do-install:
|
||||
${INSTALL_DATA} ${WRKSRC}/portsentry.conf ${PREFIX}/etc/portsentry.conf.default
|
||||
${INSTALL_DATA} ${WRKSRC}/portsentry.ignore ${PREFIX}/etc/portsentry.ignore.default
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/portsentry ${PREFIX}/bin
|
||||
${INSTALL_SCRIPT} ${WRKDIR}/portsentry.sh ${PREFIX}/etc/rc.d/
|
||||
.if !defined(NOPORTDOCS)
|
||||
${MKDIR} ${DOCSDIR}
|
||||
${INSTALL_DATA} ${WRKSRC}/README.install ${WRKSRC}/README.methods ${WRKSRC}/README.stealth \
|
||||
|
@ -1,17 +0,0 @@
|
||||
--- Makefile.orig Wed Jul 11 16:57:27 2001
|
||||
+++ Makefile Wed Sep 12 22:25:13 2001
|
||||
@@ -20,13 +20,12 @@
|
||||
#
|
||||
#
|
||||
# Generic compiler (usually linked to gcc on most platforms)
|
||||
-CC = cc
|
||||
|
||||
# GNU..
|
||||
#CC = gcc
|
||||
|
||||
# Normal systems flags
|
||||
-CFLAGS = -O -Wall
|
||||
+CFLAGS += -DPREFIX=\"${PREFIX}\"
|
||||
|
||||
# Debug mode for portsentry
|
||||
#CFLAGS = -Wall -g -DNODAEMON -DDEBUG
|
@ -1,17 +0,0 @@
|
||||
--- portsentry.conf.orig Sun May 16 21:50:55 1999
|
||||
+++ portsentry.conf Sun May 16 21:51:27 1999
|
||||
@@ -80,11 +80,11 @@
|
||||
######################
|
||||
#
|
||||
# Hosts to ignore
|
||||
-IGNORE_FILE="/usr/local/psionic/portsentry/portsentry.ignore"
|
||||
+IGNORE_FILE="__PREFIX__/etc/portsentry.ignore"
|
||||
# Hosts that have been denied (running history)
|
||||
-HISTORY_FILE="/usr/local/psionic/portsentry/portsentry.history"
|
||||
+HISTORY_FILE="__PREFIX__/etc/portsentry.history"
|
||||
# Hosts that have been denied this session only (temporary until next restart)
|
||||
-BLOCKED_FILE="/usr/local/psionic/portsentry/portsentry.blocked"
|
||||
+BLOCKED_FILE="__PREFIX__/etc/portsentry.blocked"
|
||||
|
||||
###################
|
||||
# Response Options#
|
@ -1,18 +0,0 @@
|
||||
--- portsentry_config.h.orig Sun May 16 21:52:00 1999
|
||||
+++ portsentry_config.h Sun May 16 21:52:54 1999
|
||||
@@ -29,9 +29,14 @@
|
||||
/************************************************************************/
|
||||
|
||||
|
||||
+/* Installation prefix */
|
||||
+#ifndef PREFIX
|
||||
+#define PREFIX "/usr/local"
|
||||
+#endif
|
||||
+
|
||||
/* These are probably ok. Be sure you change the Makefile if you */
|
||||
/* change the path */
|
||||
-#define CONFIG_FILE "/usr/local/psionic/portsentry/portsentry.conf"
|
||||
+#define CONFIG_FILE PREFIX"/etc/portsentry.conf"
|
||||
|
||||
/* The location of Wietse Venema's TCP Wrapper hosts.deny file */
|
||||
#define WRAPPER_HOSTS_DENY "/etc/hosts.deny"
|
17
security/portsentry/files/portsentry.sh.in
Normal file
17
security/portsentry/files/portsentry.sh.in
Normal file
@ -0,0 +1,17 @@
|
||||
#/bin/sh
|
||||
PORTSENTRY="%%PREFIX%%/bin/portsentry"
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
echo -n ' portsentry ('
|
||||
${PORTSENTRY} -tcp > /dev/null && echo -n 'tcp'
|
||||
${PORTSENTRY} -udp > /dev/null && echo -n ' udp'
|
||||
echo -n ')'
|
||||
;;
|
||||
stop)
|
||||
killall `basename ${PORTSENTRY}`
|
||||
;;
|
||||
*)
|
||||
echo "Usage: `basename $0` {start|stop}" >&2
|
||||
;;
|
||||
esac
|
@ -1,11 +1,12 @@
|
||||
bin/portsentry
|
||||
etc/rc.d/portsentry.sh
|
||||
@unexec if cmp -s %D/etc/portsentry.conf %D/etc/portsentry.conf.default; then rm -f %D/etc/portsentry.conf; fi
|
||||
etc/portsentry.conf.default
|
||||
@exec if [ ! -f %D/etc/portsentry.conf ] ; then cp -p %B/portsentry.conf %D/etc/portsentry.conf ; fi
|
||||
@unexec if cmp -s %D/etc/portsentry.ignore %D/etc/portsentry.ignore.default; then rm -f %D/etc/portsentry.ignore; fi
|
||||
etc/portsentry.ignore.default
|
||||
@exec if [ ! -f %D/etc/portsentry.ignore ] ; then cp -p %B/portsentry.ignore %D/etc/portsentry.ignore ; fi
|
||||
share/doc/portsentry/README.install
|
||||
share/doc/portsentry/README.methods
|
||||
share/doc/portsentry/README.stealth
|
||||
@dirrm share/doc/portsentry
|
||||
%%PORTDOCS%%%%DOCSDIR%%/README.install
|
||||
%%PORTDOCS%%%%DOCSDIR%%/README.methods
|
||||
%%PORTDOCS%%%%DOCSDIR%%/README.stealth
|
||||
%%PORTDOCS%%@dirrm %%DOCSDIR%%
|
||||
|
Loading…
Reference in New Issue
Block a user