aboutsummaryrefslogtreecommitdiffstats
path: root/security/nessus
diff options
context:
space:
mode:
authorlinimon <linimon@FreeBSD.org>2004-04-11 04:42:56 +0800
committerlinimon <linimon@FreeBSD.org>2004-04-11 04:42:56 +0800
commitc53945839447e42be742dcfe605411053b50b4ef (patch)
tree92e217608103fc7a276732d727f3107036e7b171 /security/nessus
parent86d8eb25f582dbee4e38c5aef6ec5b260e540835 (diff)
downloadfreebsd-ports-gnome-c53945839447e42be742dcfe605411053b50b4ef.tar.gz
freebsd-ports-gnome-c53945839447e42be742dcfe605411053b50b4ef.tar.zst
freebsd-ports-gnome-c53945839447e42be742dcfe605411053b50b4ef.zip
Adopt the standard nessus directory structure, reducing the number of
files in ${PREFIX}/etc/nessus. Move existing files to the right places. Bump PORTREVISION. (Also do a little bit of work on pkg-plist).
Diffstat (limited to 'security/nessus')
-rw-r--r--security/nessus/Makefile8
-rw-r--r--security/nessus/pkg-plist15
-rw-r--r--security/nessus/scripts/move_nessus51
3 files changed, 61 insertions, 13 deletions
diff --git a/security/nessus/Makefile b/security/nessus/Makefile
index e582c5cc1457..d4a8cf06f13e 100644
--- a/security/nessus/Makefile
+++ b/security/nessus/Makefile
@@ -7,7 +7,7 @@
PORTNAME= nessus
PORTVERSION= 2.0.10a
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= security
MASTER_SITES= ftp://ftp.nessus.org/pub/nessus/nessus-${PORTVERSION}/src/ \
ftp://ftp.gwdg.de/pub/linux/misc/nessus/nessus-${PORTVERSION}/src/ \
@@ -37,14 +37,12 @@ PKGNAMESUFFIX= -gtk
CONFIGURE_ARGS+=--disable-gtk
.endif
-CONFIGURE_ARGS+= --sharedstatedir=${PREFIX}/etc/nessus/com \
- --localstatedir=${PREFIX}/etc/nessus/var
-
MAN1= nessus.1 nessus-mkrand.1 nessus-mkcert-client.1
MAN8= nessusd.8 nessus-adduser.8 nessus-mkcert.8 nessus-rmuser.8
post-install:
-.if ! exists(${PREFIX}/etc/nessus/var/CA/serverkey.pem)
+ @${SETENV} ${SCRIPTS_ENV} ${SH} ${SCRIPTDIR}/move_nessus
+.if ! exists(${PREFIX}/var/CA/serverkey.pem)
.if ! defined(BATCH)
${PREFIX}/sbin/nessus-mkcert
.else
diff --git a/security/nessus/pkg-plist b/security/nessus/pkg-plist
index 909d0c198585..9decbbf7d783 100644
--- a/security/nessus/pkg-plist
+++ b/security/nessus/pkg-plist
@@ -14,14 +14,13 @@ sbin/nessus-adduser
sbin/nessus-mkcert
sbin/nessus-rmuser
sbin/nessusd
-@exec mkdir -p %D/etc/nessus/var/nessus/jobs
-@exec mkdir -p %D/etc/nessus/var/nessus/logs
-@exec mkdir -p %D/etc/nessus/var/nessus/users
-@unexec rmdir %D/etc/nessus/var/nessus/jobs 2>/dev/null || true
-@unexec rmdir %D/etc/nessus/var/nessus/logs 2>/dev/null || true
-@unexec rmdir %D/etc/nessus/var/nessus/users 2>/dev/null || true
-@unexec rmdir %D/etc/nessus/var/nessus 2>/dev/null || true
-@unexec rmdir %D/etc/nessus/var 2>/dev/null || true
+@exec mkdir -p %D/var/nessus/jobs
+@exec mkdir -p %D/var/nessus/logs
+@exec mkdir -p %D/var/nessus/users
+@unexec rmdir %D/var/nessus/jobs 2>/dev/null || true
+@unexec rmdir %D/var/nessus/logs 2>/dev/null || true
+@unexec rmdir %D/var/nessus/users 2>/dev/null || true
+@unexec rmdir %D/var/nessus 2>/dev/null || true
@unexec rmdir %D/etc/nessus 2>/dev/null || true
@exec mkdir -p %D/lib/nessus/plugins
@unexec rmdir %D/lib/nessus/plugins 2>/dev/null || true
diff --git a/security/nessus/scripts/move_nessus b/security/nessus/scripts/move_nessus
new file mode 100644
index 000000000000..0da5e8a62128
--- /dev/null
+++ b/security/nessus/scripts/move_nessus
@@ -0,0 +1,51 @@
+#!/bin/sh
+#
+# $FreeBSD: /tmp/pcvs/ports/security/nessus/scripts/move_nessus,v 1.1 2004-04-10 20:42:56 linimon Exp $
+#
+# set -x
+
+trap ' cleanup ' 0
+trap ' echo_signal; exit 1' 1 2 3 15
+
+cleanup() {
+ # No tmp file to remove up to now ;-)
+}
+
+echo_signal() {
+ echo "Got Signal -- aborting `basename $0`"
+}
+
+PATH=/bin:/usr/bin
+
+
+if [ -f $PREFIX/etc/nessus/nessusd.conf ]; then
+ mv $PREFIX/etc/nessus/nessusd.conf $PREFIX/etc/nessus/nessusd.conf.bak
+ sed -e "s,/usr/local/etc/nessus/var,/usr/local/var,g" \
+ -e "s,/usr/local/etc/nessus/com,/usr/local/com,g" \
+ $PREFIX/etc/nessus/nessusd.conf.bak > $PREFIX/etc/nessus/nessusd.conf
+fi
+if [ -d $PREFIX/etc/nessus/var/nessus/users ]; then
+ printf "\n\nMigrating nessus to default directory scheme\n"
+ printf "============================================\n\n"
+ cd $PREFIX/etc/nessus/var/nessus/users
+ for i in *; do
+ if [ $i != '*' ]; then
+ mv $i $PREFIX/var/nessus/users
+ printf "Moving nessus user %s\n" $i
+ fi
+ done
+ printf "\n"
+fi
+if [ ! -d $PREFIX/com/CA ]; then
+ if [ -d $PREFIX/etc/nessus/com/CA ]; then
+ if [ ! -d $PREFIX/com ]; then
+ mkdir -m 755 $PREFIX/com
+ fi
+ mv $PREFIX/etc/nessus/com/CA $PREFIX/com/CA
+ fi
+ if [ -d $PREFIX/etc/nessus/var/CA ]; then
+ if [ ! -d $PREFIX/var/CA ]; then
+ mv $PREFIX/etc/nessus/var/CA $PREFIX/var/CA
+ fi
+ fi
+fi