aboutsummaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
authorSergey Matveychuk <sem@FreeBSD.org>2004-12-12 21:37:53 +0000
committerSergey Matveychuk <sem@FreeBSD.org>2004-12-12 21:37:53 +0000
commit404f11b6fd7254c68e557990dd6e878f305a2ba5 (patch)
treea9b29bae15e6c8a9ef3068d4937757be9513d2a7 /security
parent2cc7b41b64a516ff24f17a585ebd8b94b28e41a1 (diff)
downloadports-404f11b6fd7254c68e557990dd6e878f305a2ba5.tar.gz
ports-404f11b6fd7254c68e557990dd6e878f305a2ba5.zip
Notes
Diffstat (limited to 'security')
-rw-r--r--security/nessus-devel/pkg-plist5
-rw-r--r--security/nessus-devel/scripts/move_nessus10
-rw-r--r--security/nessus/pkg-plist6
-rw-r--r--security/nessus/scripts/move_nessus10
4 files changed, 18 insertions, 13 deletions
diff --git a/security/nessus-devel/pkg-plist b/security/nessus-devel/pkg-plist
index f9c74d427f70..888c58c17474 100644
--- a/security/nessus-devel/pkg-plist
+++ b/security/nessus-devel/pkg-plist
@@ -2,8 +2,8 @@ bin/nessus
bin/nessus-fetch
bin/nessus-mkcert-client
bin/nessus-mkrand
-@unexec if cmp -s %D/etc/nessus/nessusd.conf.dist %D/etc/nessus/nessusd.conf; then rm -f %D/etc/nessus/nessusd.conf; fi
-@unexec if cmp -s %D/etc/nessus/nessusd.rules.dist %D/etc/nessus/nessusd.rules; then rm -f %D/etc/nessus/nessusd.rules; fi
+@unexec if cmp -s %D/etc/nessus/nessusd.conf.dist %D/etc/nessus/nessusd.conf; then rm -f %D/etc/nessus/nessusd.conf 2> /dev/null; fi || true
+@unexec if cmp -s %D/etc/nessus/nessusd.rules.dist %D/etc/nessus/nessusd.rules; then rm -f %D/etc/nessus/nessusd.rules 2> /dev/null; fi || true
etc/nessus/nessusd.conf.dist
etc/nessus/nessusd.rules.dist
@exec if [ ! -f %D/etc/nessus/nessusd.conf ]; then cp -p %D/etc/nessus/nessusd.conf.dist %D/etc/nessus/nessusd.conf; fi
@@ -26,6 +26,7 @@ sbin/nessusd
@exec mkdir -p %D/var/nessus/jobs
@exec mkdir -p %D/var/nessus/logs
@exec mkdir -p %D/var/nessus/users
+@unexec if [ ! -s %D/var/nessus/logs/nessusd.messages ]; then rm %D/var/nessus/logs/nessusd.messages 2> /dev/null; fi || true
@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
diff --git a/security/nessus-devel/scripts/move_nessus b/security/nessus-devel/scripts/move_nessus
index 32b3b8b872d6..44dd18c6cc88 100644
--- a/security/nessus-devel/scripts/move_nessus
+++ b/security/nessus-devel/scripts/move_nessus
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $FreeBSD: /tmp/pcvs/ports/security/nessus-devel/scripts/Attic/move_nessus,v 1.2 2004-08-13 14:15:25 vs Exp $
+# $FreeBSD: /tmp/pcvs/ports/security/nessus-devel/scripts/Attic/move_nessus,v 1.3 2004-12-12 21:37:53 sem Exp $
#
# set -x
@@ -19,10 +19,12 @@ 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" \
+ if grep -q "$PREFIX/etc/nessus/var" $PREFIX/etc/nessus/nessusd.conf; then
+ mv $PREFIX/etc/nessus/nessusd.conf $PREFIX/etc/nessus/nessusd.conf.bak
+ sed -e "s,$PREFIX/etc/nessus/var,$PREFIX/var,g" \
+ -e "s,$PREFIX/etc/nessus/com,$PREFIX/com,g" \
$PREFIX/etc/nessus/nessusd.conf.bak > $PREFIX/etc/nessus/nessusd.conf
+ fi
fi
if [ -d $PREFIX/etc/nessus/var/nessus/users ]; then
rmdir $PREFIX/etc/nessus/var/nessus/users > /dev/null 2>/dev/null
diff --git a/security/nessus/pkg-plist b/security/nessus/pkg-plist
index fb04d9d6a30c..888c58c17474 100644
--- a/security/nessus/pkg-plist
+++ b/security/nessus/pkg-plist
@@ -2,8 +2,8 @@ bin/nessus
bin/nessus-fetch
bin/nessus-mkcert-client
bin/nessus-mkrand
-@unexec if cmp -s %D/etc/nessus/nessusd.conf.dist %D/etc/nessus/nessusd.conf; then rm -f %D/etc/nessus/nessusd.conf; fi
-@unexec if cmp -s %D/etc/nessus/nessusd.rules.dist %D/etc/nessus/nessusd.rules; then rm -f %D/etc/nessus/nessusd.rules; fi
+@unexec if cmp -s %D/etc/nessus/nessusd.conf.dist %D/etc/nessus/nessusd.conf; then rm -f %D/etc/nessus/nessusd.conf 2> /dev/null; fi || true
+@unexec if cmp -s %D/etc/nessus/nessusd.rules.dist %D/etc/nessus/nessusd.rules; then rm -f %D/etc/nessus/nessusd.rules 2> /dev/null; fi || true
etc/nessus/nessusd.conf.dist
etc/nessus/nessusd.rules.dist
@exec if [ ! -f %D/etc/nessus/nessusd.conf ]; then cp -p %D/etc/nessus/nessusd.conf.dist %D/etc/nessus/nessusd.conf; fi
@@ -26,7 +26,7 @@ sbin/nessusd
@exec mkdir -p %D/var/nessus/jobs
@exec mkdir -p %D/var/nessus/logs
@exec mkdir -p %D/var/nessus/users
-@unexec if [ ! -s %D/var/nessus/logs/nessusd.messages ]; then rm %D/var/nessus/logs/nessusd.messages; fi
+@unexec if [ ! -s %D/var/nessus/logs/nessusd.messages ]; then rm %D/var/nessus/logs/nessusd.messages 2> /dev/null; fi || true
@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
diff --git a/security/nessus/scripts/move_nessus b/security/nessus/scripts/move_nessus
index 7c5d16e4efac..0ed0367a1e72 100644
--- a/security/nessus/scripts/move_nessus
+++ b/security/nessus/scripts/move_nessus
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $FreeBSD: /tmp/pcvs/ports/security/nessus/scripts/move_nessus,v 1.2 2004-08-13 13:36:02 vs Exp $
+# $FreeBSD: /tmp/pcvs/ports/security/nessus/scripts/move_nessus,v 1.3 2004-12-12 21:37:53 sem Exp $
#
# set -x
@@ -19,10 +19,12 @@ 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" \
+ if grep -q "$PREFIX/etc/nessus/var" $PREFIX/etc/nessus/nessusd.conf; then
+ mv $PREFIX/etc/nessus/nessusd.conf $PREFIX/etc/nessus/nessusd.conf.bak
+ sed -e "s,$PREFIX/etc/nessus/var,$PREFIX/var,g" \
+ -e "s,$PREFIX/etc/nessus/com,$PREFIX/com,g" \
$PREFIX/etc/nessus/nessusd.conf.bak > $PREFIX/etc/nessus/nessusd.conf
+ fi
fi
if [ -d $PREFIX/etc/nessus/var/nessus/users ]; then
rmdir $PREFIX/etc/nessus/var/nessus/users > /dev/null 2>/dev/null