aboutsummaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorglarkin <glarkin@FreeBSD.org>2010-06-10 01:29:38 +0800
committerglarkin <glarkin@FreeBSD.org>2010-06-10 01:29:38 +0800
commit770a5f2b990d732f793dc841f88be8e16c028906 (patch)
treecd41cc330b7b3d6e1d0eb16e17ad96cc22acb680 /security
parent83de4ff8a591b1c6391670f12126198073f39aa8 (diff)
downloadfreebsd-ports-gnome-770a5f2b990d732f793dc841f88be8e16c028906.tar.gz
freebsd-ports-gnome-770a5f2b990d732f793dc841f88be8e16c028906.tar.zst
freebsd-ports-gnome-770a5f2b990d732f793dc841f88be8e16c028906.zip
- Parameterized more command names and paths to ensure that installation
works with non-standard build settings.
Diffstat (limited to 'security')
-rw-r--r--security/logcheck/Makefile5
-rw-r--r--security/logcheck/files/extra-patch-src__logcheck.in6
-rw-r--r--security/logcheck/files/pkg-deinstall.in8
-rw-r--r--security/logcheck/files/pkg-install.in10
4 files changed, 15 insertions, 14 deletions
diff --git a/security/logcheck/Makefile b/security/logcheck/Makefile
index 9cca1c26eea9..eee1990549cf 100644
--- a/security/logcheck/Makefile
+++ b/security/logcheck/Makefile
@@ -34,7 +34,8 @@ SHAREMODE= 640
SUB_LIST+= LOGCHECK_USER=${LOGCHECK_USER} \
LOGCHECK_UID=${LOGCHECK_UID} \
LOGCHECK_GROUP=${LOGCHECK_GROUP} \
- LOGCHECK_GID=${LOGCHECK_GID}
+ LOGCHECK_GID=${LOGCHECK_GID} \
+ PW=${PW}
SUB_FILES= pkg-install pkg-deinstall pkg-message
CONFIG_DIRS= cracking.d ignore.d.paranoid ignore.d.server \
ignore.d.workstation violations.d violations.ignore.d
@@ -102,7 +103,7 @@ post-install:
.if !defined(NOPORTDOCS)
@${INSTALL} -d ${DOCSDIR}
@cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${DOCSDIR}
- ${CHMOD} 644 ${DOCSDIR}/*
+ @${CHMOD} 644 ${DOCSDIR}/*
.endif
@${CAT} ${PKGMESSAGE}
diff --git a/security/logcheck/files/extra-patch-src__logcheck.in b/security/logcheck/files/extra-patch-src__logcheck.in
index b933608ab879..ab30dd748411 100644
--- a/security/logcheck/files/extra-patch-src__logcheck.in
+++ b/security/logcheck/files/extra-patch-src__logcheck.in
@@ -2,7 +2,7 @@
+++ src/logcheck 2009-12-17 19:33:34.000000000 -0500
@@ -1,4 +1,4 @@
-#!/bin/bash
-+#!/usr/local/bin/bash
++#!%%LOCALBASE%%/bin/bash
#
# Copyright (C) 2004-2006 Debian Logcheck Team
# <logcheck-devel@alioth.lists.debian.org>
@@ -11,7 +11,7 @@
if [ $UID == 0 ]; then
echo "logcheck should not be run as root. Use su to invoke logcheck:"
- echo "su -s /bin/bash -c \"/usr/sbin/logcheck${@:+ $@}\" logcheck"
-+ echo "su -m logcheck -c \"/usr/local/bin/bash %%PREFIX%%/sbin/logcheck${@:+ $@}\""
++ echo "su -m logcheck -c \"%%LOCALBASE%%/bin/bash %%PREFIX%%/sbin/logcheck${@:+ $@}\""
echo "Or use sudo: sudo -u logcheck logcheck${@:+ $@}."
# you may want to uncomment that hack to let logcheck invoke itself.
- # su -s /bin/bash -c "$0 $*" logcheck
@@ -22,7 +22,7 @@
- ! -f /usr/bin/lockfile-remove -o \
- ! -f /usr/bin/lockfile-touch ]; then
- echo "fatal: lockfile-progs is a prerequisite for logcheck, and was not found."
-+ # su -s /usr/local/bin/bash -c "$0 $*" logcheck
++ # su -s %%LOCALBASE%%/bin/bash -c "$0 $*" logcheck
exit 1
fi
diff --git a/security/logcheck/files/pkg-deinstall.in b/security/logcheck/files/pkg-deinstall.in
index 998bb95121eb..e39561392778 100644
--- a/security/logcheck/files/pkg-deinstall.in
+++ b/security/logcheck/files/pkg-deinstall.in
@@ -22,12 +22,12 @@ POST-DEINSTALL)
echo "---> Removed crontab for \"${user}\"."
fi
- if pw user show ${user} > /dev/null 2>&1; then
- pw user del ${user}
+ if %%PW%% user show ${user} > /dev/null 2>&1; then
+ %%PW%% user del ${user}
echo "---> Removed user \"${user}\" and group \"${group}\"."
fi
- if pw group show ${group} > /dev/null 2>&1; then
- pw group del ${group}
+ if %%PW%% group show ${group} > /dev/null 2>&1; then
+ %%PW%% group del ${group}
fi
;;
esac
diff --git a/security/logcheck/files/pkg-install.in b/security/logcheck/files/pkg-install.in
index b5e5d2005e32..cb17b01e334b 100644
--- a/security/logcheck/files/pkg-install.in
+++ b/security/logcheck/files/pkg-install.in
@@ -6,21 +6,21 @@ group="%%LOGCHECK_GROUP%%"
gid="%%LOGCHECK_GID%%"
descr="Logcheck system account"
homedir="/var/db/logcheck"
-shell="/usr/local/bin/bash"
+shell="%%LOCALBASE%%/bin/bash"
configfiles="logcheck.conf logcheck.logfiles"
case $2 in
PRE-INSTALL)
- if pw group show ${group} > /dev/null 2>&1; then
+ if %%PW%% group show ${group} > /dev/null 2>&1; then
echo "---> You already have a group \"${group}\", so I will use it."
else
- pw group add "${group}" -g "${gid}"
+ %%PW%% group add "${group}" -g "${gid}"
echo "---> Created group \"${group}\"."
fi
- if pw user show ${user} > /dev/null 2>&1; then
+ if %%PW%% user show ${user} > /dev/null 2>&1; then
echo "---> You already have a user \"${user}\", so I will use it."
else
- pw user add -n ${user} -c "${descr}" -d "${homedir}" -s "${shell}" -g ${group} -u "${uid}"
+ %%PW%% user add -n ${user} -c "${descr}" -d "${homedir}" -s "${shell}" -g ${group} -u "${uid}"
echo "---> Created user \"${user}\"."
fi
;;