Add some improvements via Doug:

This patch changes the order in which the conf file is read vs.
when the default variable assignments are made in order to provide
the ability to override them in the conf file. It also adds the
ability to include a conf file in the same directory as the script.

The patch also changes some of the = assignments to := where
having a null setting by mistake would be fatal.

The use case for these changes is the ability to "package" all
of the elements together in one place for use on multiple systems
that can all mount the same central location.

PR:		154518
Submitted by:	dougb
Hat:		secteam
Feature safe:	yes
This commit is contained in:
Remko Lodder 2011-02-05 08:37:06 +00:00
parent 3bb0868492
commit dc8cb9de3b
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=268644
2 changed files with 15 additions and 11 deletions

View File

@ -6,7 +6,7 @@
#
PORTNAME= portaudit
PORTVERSION= 0.5.16
PORTVERSION= 0.5.17
CATEGORIES= ports-mgmt security
DISTFILES=

View File

@ -33,19 +33,23 @@
portaudit_confs()
{
: ${portaudit_dir="%%DATABASEDIR%%"}
: ${portaudit_filename="auditfile.tbz"}
: ${portaudit_fetch_env=""}
: ${portaudit_fetch_cmd="fetch -1mp"}
: ${portaudit_sites="http://portaudit.FreeBSD.org/"}
: ${portaudit_fixed=""}
if [ -r %%PREFIX%%/etc/portaudit.conf ]; then
. %%PREFIX%%/etc/portaudit.conf
fi
if [ -r "${0%/*}/portaudit.conf" ]; then
. ${0%/*}/portaudit.conf
fi
: ${portaudit_dir:="%%DATABASEDIR%%"}
: ${portaudit_filename:="auditfile.tbz"}
: ${portaudit_fetch_env=""}
: ${portaudit_fetch_cmd:="fetch -1mp"}
: ${portaudit_sites:="http://portaudit.FreeBSD.org/"}
: ${portaudit_fixed=""}
}
extract_auditfile()