summaryrefslogtreecommitdiff
path: root/security/courier-authlib/files
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2008-02-18 20:26:33 +0000
committerjlam <jlam@pkgsrc.org>2008-02-18 20:26:33 +0000
commit821429d80b13319e8da9553ffe59bc1a433d2eee (patch)
tree227b53d0e935c93c88337ac2c79006548e3e0f2b /security/courier-authlib/files
parent308358567572ca70e5c5463e9a893c316ed27faa (diff)
downloadpkgsrc-821429d80b13319e8da9553ffe59bc1a433d2eee.tar.gz
+ Add full DESTDIR support.
+ Create any required directories with the right ownership and permissions as a "prestart" action in the authdaemond rc.d script. Bump the PKGREVISION to 1.
Diffstat (limited to 'security/courier-authlib/files')
-rw-r--r--security/courier-authlib/files/authdaemond.sh23
1 files changed, 19 insertions, 4 deletions
diff --git a/security/courier-authlib/files/authdaemond.sh b/security/courier-authlib/files/authdaemond.sh
index 0b4a3d1c953..41bea82f9f6 100644
--- a/security/courier-authlib/files/authdaemond.sh
+++ b/security/courier-authlib/files/authdaemond.sh
@@ -1,6 +1,6 @@
#!@RCD_SCRIPTS_SHELL@
#
-# $NetBSD: authdaemond.sh,v 1.2 2005/02/21 17:08:39 jlam Exp $
+# $NetBSD: authdaemond.sh,v 1.3 2008/02/18 20:26:33 jlam Exp $
#
# Courier user authentication daemon
#
@@ -16,10 +16,25 @@ ctl_command="@PREFIX@/sbin/authdaemond"
pidfile="@AUTHDAEMONVAR@/pid"
required_files="@PKG_SYSCONFDIR@/authdaemonrc"
-start_cmd="courier_doit start"
-stop_cmd="courier_doit stop"
+start_cmd="authdaemond_doit start"
+stop_cmd="authdaemond_doit stop"
-courier_doit()
+mkdir_perms()
+{
+ dir="$1"; user="$2"; group="$3"; mode="$4"
+ @TEST@ -d $dir || @MKDIR@ $dir
+ @CHOWN@ $user $dir
+ @CHGRP@ $group $dir
+ @CHMOD@ $mode $dir
+}
+
+authdaemond_prestart()
+{
+ mkdir_perms @AUTHDAEMONVAR@ \
+ @COURIER_USER@ @COURIER_GROUP@ 0750
+}
+
+authdaemond_doit()
{
action=$1
case ${action} in