summaryrefslogtreecommitdiffstats
path: root/sysutils/policykit
diff options
context:
space:
mode:
authormarcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059>2006-06-16 13:19:02 +0800
committermarcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059>2006-06-16 13:19:02 +0800
commit9f77ba3e09270156a15e0ff9694b49b084857a06 (patch)
treee85f1b2e7d338116fe3abe2932f87ce3da4b431d /sysutils/policykit
parent05e3d97a9f08393cbce77ed6db51412082e78cdf (diff)
downloadmarcuscom-ports-9f77ba3e09270156a15e0ff9694b49b084857a06.tar
marcuscom-ports-9f77ba3e09270156a15e0ff9694b49b084857a06.tar.gz
marcuscom-ports-9f77ba3e09270156a15e0ff9694b49b084857a06.tar.bz2
marcuscom-ports-9f77ba3e09270156a15e0ff9694b49b084857a06.tar.lz
marcuscom-ports-9f77ba3e09270156a15e0ff9694b49b084857a06.tar.xz
marcuscom-ports-9f77ba3e09270156a15e0ff9694b49b084857a06.tar.zst
marcuscom-ports-9f77ba3e09270156a15e0ff9694b49b084857a06.zip
Force dbus to start if polkitd_enable="YES".
git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@6453 df743ca5-7f9a-e211-a948-0013205c9059
Diffstat (limited to 'sysutils/policykit')
-rw-r--r--sysutils/policykit/Makefile3
-rw-r--r--sysutils/policykit/files/polkitd.in29
2 files changed, 29 insertions, 3 deletions
diff --git a/sysutils/policykit/Makefile b/sysutils/policykit/Makefile
index 37c25d380..55d851b3a 100644
--- a/sysutils/policykit/Makefile
+++ b/sysutils/policykit/Makefile
@@ -3,11 +3,12 @@
# Whom: Joe Marcus Clarke <marcus@FreeBSD.org>
#
# $FreeBSD$
-# $MCom: ports/sysutils/policykit/Makefile,v 1.7 2006/05/02 05:53:21 marcus Exp $
+# $MCom: ports/sysutils/policykit/Makefile,v 1.8 2006/05/14 20:55:52 marcus Exp $
#
PORTNAME= policykit
PORTVERSION= 0.1.20060514
+PORTREVISION= 1
CATEGORIES= sysutils gnome
MASTER_SITES= http://www.marcuscom.com/downloads/
DISTNAME= PolicyKit-${PORTVERSION}
diff --git a/sysutils/policykit/files/polkitd.in b/sysutils/policykit/files/polkitd.in
index ec82cc7b2..3ded54522 100644
--- a/sysutils/policykit/files/polkitd.in
+++ b/sysutils/policykit/files/polkitd.in
@@ -20,9 +20,34 @@ rcvar=`set_rcvar`
command="%%PREFIX%%/sbin/polkitd"
pidfile="/var/run/${name}/${name}.pid"
-stop_postcmd=stop_postcmd
+start_precmd="polkitd_precmd"
+stop_postcmd="polkitd_postcmd"
-stop_postcmd()
+local_force_depend()
+{
+ _depend="$1"
+ if [ -f %%LOCALBASE%%/etc/rc.d/${_depend}.sh ]; then
+ _depend="${_depend}.sh"
+ fi
+
+ if ! %%LOCALBASE%%/etc/rc.d/${_depend} forcestatus 1>/dev/null 2>&1 &&
+ ! %%LOCALBASE%%/etc/rc.d/${_depend} forcestart; then
+ return 1
+ fi
+ return 0
+}
+
+polkitd_precmd()
+{
+ if ! checkyesno dbus_enable
+ then
+ local_force_depend dbus || return 1
+ fi
+
+ mkdir -p $(dirname $pidfile)
+}
+
+polkitd_postcmd()
{
rm -f $pidfile
}