aboutsummaryrefslogtreecommitdiff
path: root/sysutils/py-bcfg2
diff options
context:
space:
mode:
authorBoris Samorodov <bsam@FreeBSD.org>2008-01-12 14:46:13 +0000
committerBoris Samorodov <bsam@FreeBSD.org>2008-01-12 14:46:13 +0000
commit578dc576efaaa152a6f530d2482f343dde6ffed4 (patch)
treea61741b99f1c33ebc0b441c0bb9ac7978b41fa3f /sysutils/py-bcfg2
parent188b79fbfb762816989b2075ae00ec48b65a5bac (diff)
downloadports-578dc576efaaa152a6f530d2482f343dde6ffed4.tar.gz
ports-578dc576efaaa152a6f530d2482f343dde6ffed4.zip
* Make the port use ${PREFIX}/etc/bcfg2.conf rather than /etc/bcfg2.conf;
* Added rc.subr-style startup script for the server; * Bump PORTREVISION. PR: 115342 Submitted by: Lars Erik Gullerud <lerik at nolink.net> Approved by: Robert Gogolok <gogo at cs.uni-sb.de> (maintainer)
Notes
Notes: svn path=/head/; revision=205511
Diffstat (limited to 'sysutils/py-bcfg2')
-rw-r--r--sysutils/py-bcfg2/Makefile7
-rw-r--r--sysutils/py-bcfg2/files/bcfg2.in30
2 files changed, 37 insertions, 0 deletions
diff --git a/sysutils/py-bcfg2/Makefile b/sysutils/py-bcfg2/Makefile
index c7b0e68852f9..596588e1ab49 100644
--- a/sysutils/py-bcfg2/Makefile
+++ b/sysutils/py-bcfg2/Makefile
@@ -7,6 +7,7 @@
PORTNAME= bcfg2
PORTVERSION= 0.9.5.5
+PORTREVISION= 1
CATEGORIES= sysutils
MASTER_SITES= ftp://ftp.mcs.anl.gov/pub/bcfg/ \
http://mirror.opensysadmin.com/bcfg/
@@ -23,6 +24,9 @@ USE_PYTHON= yes
USE_PYDISTUTILS= yes
PYDISTUTILS_PKGNAME= Bcfg2
+USE_RC_SUBR= bcfg2
+SUB_LIST+= PYTHON_CMD=${PYTHON_CMD}
+
MAN1= bcfg2.1
MAN5= bcfg2.conf.5
MAN8= bcfg2-admin.8 bcfg2-build-reports.8 bcfg2-repo-validate.8 \
@@ -32,6 +36,9 @@ PORTDOCS= AUTHORS COPYRIGHT ChangeLog README
post-patch:
@${REINPLACE_CMD} -e 's|share/man|man|g' ${WRKSRC}/setup.py
+.for f in bcfg2 bcfg2-admin bcfg2-build-reports bcfg2-info bcfg2-repo-validate bcfg2-server bcfg2-ping-sweep bcfg2-query bcfg2-remote
+ @${REINPLACE_CMD} -i '' -e 's|/etc/bcfg2.conf|${PREFIX}/etc/bcfg2.conf|g' ${WRKSRC}/src/sbin/$f
+.endfor
.if !defined(NOPORTDOCS)
post-install:
diff --git a/sysutils/py-bcfg2/files/bcfg2.in b/sysutils/py-bcfg2/files/bcfg2.in
new file mode 100644
index 000000000000..c1d0873bb6c5
--- /dev/null
+++ b/sysutils/py-bcfg2/files/bcfg2.in
@@ -0,0 +1,30 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+# PROVIDE: bcfg2
+# REQUIRE: LOGIN
+# KEYWORD: shutdown
+#
+# Add the following lines to /etc/rc.conf to enable bcfg2-server:
+# bcfg2_enable (bool): Set it to "YES" to enable bcfg2.
+# Default is "NO".
+# bcfg2_flags (str): Flags passed to bcfg2 on startup.
+# Default is "".
+
+. %%RC_SUBR%%
+
+name="bcfg2"
+rcvar=${name}_enable
+
+load_rc_config $name
+
+: ${bcfg2_enable="NO"}
+: ${bcfg2_pidfile="/var/run/$name.pid"}
+: ${bcfg2_flags="-D ${bcfg2_pidfile}"}
+
+pidfile=${bcfg2_pidfile}
+command=%%PREFIX%%/bin/${name}-server
+command_interpreter=%%PYTHON_CMD%%
+
+run_rc_command "$1"