From be4323fd9b9ac929391c81b28f2911c71bb8b333 Mon Sep 17 00:00:00 2001 From: marcus Date: Mon, 1 May 2006 07:28:43 +0000 Subject: Add an rc.d script for polkitd. git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@6186 df743ca5-7f9a-e211-a948-0013205c9059 --- sysutils/policykit/Makefile | 5 ++++- sysutils/policykit/files/polkitd.in | 31 +++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 sysutils/policykit/files/polkitd.in (limited to 'sysutils') diff --git a/sysutils/policykit/Makefile b/sysutils/policykit/Makefile index d5631dea4..2648c7e60 100644 --- a/sysutils/policykit/Makefile +++ b/sysutils/policykit/Makefile @@ -3,11 +3,12 @@ # Whom: Joe Marcus Clarke # # $FreeBSD$ -# $MCom$ +# $MCom: ports/sysutils/policykit/Makefile,v 1.2 2006/05/01 05:34:11 marcus Exp $ # PORTNAME= policykit PORTVERSION= 0.1 +PORTREVISION= 1 CATEGORIES= sysutils gnome MASTER_SITES= http://www.marcuscom.com/downloads/ DISTNAME= PolicyKit-${PORTVERSION} @@ -28,6 +29,8 @@ CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \ LDFLAGS="-L${LOCALBASE}/lib" \ GTKDOC="false" +USE_RC_SUBR= polkitd + post-install: .if !defined(PACKAGE_BUILDING) @${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL diff --git a/sysutils/policykit/files/polkitd.in b/sysutils/policykit/files/polkitd.in new file mode 100644 index 000000000..feeb6cfb9 --- /dev/null +++ b/sysutils/policykit/files/polkitd.in @@ -0,0 +1,31 @@ +#!/bin/sh +# +# $FreeBSD$ +# +# PROVIDE: polkitd +# REQUIRE: DAEMON +# +# Add the following line to /etc/rc.conf to enable the PolicyKit daemon: +# +# polkitd_enable="YES" +# + +polkitd_enable=${polkitd_enable-"NO"} + +. %%RC_SUBR%% + +name=polkitd +rcvar=`set_rcvar` + +command="%%PREFIX%%/sbin/polkitd" +pidfile="/var/run/${name}/${name}.pid" + +stop_postcmd=stop_postcmd + +stop_postcmd() +{ + rm -f $pidfile +} + +load_rc_config ${name} +run_rc_command "$1" -- cgit v1.2.3