ports/115342: [PATCH] sysutils/py-bcfg2: FreeBSD fixes and
startup script
Lars Erik Gullerud
lerik at nolink.net
Thu Aug 9 14:10:10 UTC 2007
The following reply was made to PR ports/115342; it has been noted by GNATS.
From: Lars Erik Gullerud <lerik at nolink.net>
To: bug-followup at FreeBSD.org
Cc:
Subject: Re: ports/115342: [PATCH] sysutils/py-bcfg2: FreeBSD fixes and
startup script
Date: Thu, 9 Aug 2007 15:33:47 +0200 (CEST)
Sorry, when send-pr'ing this I accidentally inverted the file arguments to
diff and so the patch included is in reverse, correct one is below:
--- py-bcfg2.patch begins here ---
diff -ruN py-bcfg2.old/Makefile py-bcfg2/Makefile
--- py-bcfg2.old/Makefile Mon Aug 6 11:49:50 2007
+++ py-bcfg2/Makefile Tue Aug 7 09:29:39 2007
@@ -7,6 +7,7 @@
PORTNAME= bcfg2
PORTVERSION= 0.9.4
+PORTREVISION= 1
CATEGORIES= sysutils
MASTER_SITES= ftp://ftp.mcs.anl.gov/pub/bcfg/ \
http://mirror.opensysadmin.com/bcfg/
@@ -22,6 +23,10 @@
USE_PYTHON= yes
USE_PYDISTUTILS= yes
+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 bcfg2-server.8 bcfg2-info.8
@@ -30,6 +35,10 @@
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
+ @${REINPLACE_CMD} -e 's|/etc/bcfg2.conf|${PREFIX}/etc/bcfg2.conf|g' ${WRKSRC}/src/sbin/$f
+.endfor
+ @${RM} ${WRKSRC}/src/sbin/*.bak
.if !defined(NOPORTDOCS)
post-install:
diff -ruN py-bcfg2.old/files/bcfg2.in py-bcfg2/files/bcfg2.in
--- py-bcfg2.old/files/bcfg2.in Thu Jan 1 01:00:00 1970
+++ py-bcfg2/files/bcfg2.in Tue Aug 7 09:51:30 2007
@@ -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"
--- py-bcfg2.patch ends here ---
More information about the freebsd-python
mailing list