Date: Thu, 9 Aug 2007 14:10:09 GMT From: Lars Erik Gullerud <lerik@nolink.net> To: freebsd-python@FreeBSD.org Subject: Re: ports/115342: [PATCH] sysutils/py-bcfg2: FreeBSD fixes and startup script Message-ID: <200708091410.l79EA9G7099002@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/115342; it has been noted by GNATS. From: Lars Erik Gullerud <lerik@nolink.net> To: bug-followup@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 ---
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200708091410.l79EA9G7099002>