Date: Fri, 09 Dec 2005 16:13:00 +0100 From: Pav Lucistnik <pav@FreeBSD.org> To: Ion-Mihai Tetcu <itetcu@people.tecnik93.com> Cc: freebsd-ports-bugs@FreeBSD.org, dougb@FreeBSD.org, bug-followup@FreeBSD.org Subject: Re: ports/90070: [MAINTAINER] mail/rabl_server: per sougb request, use "new style" RC script Message-ID: <1134141180.31489.3.camel@pav.hide.vol.cz> In-Reply-To: <20051209165102.7b5bf038@it.buh.tecnik93.com> References: <200512090922.jB99MYbH094744@freefall.freebsd.org> <20051209143235.79632f96@it.buh.tecnik93.com> <1134131789.28991.24.camel@pav.hide.vol.cz> <20051209150907.1725f4c9@it.buh.tecnik93.com> <1134134096.28991.27.camel@pav.hide.vol.cz> <20051209153510.5182ebe2@it.buh.tecnik93.com> <1134135523.28991.30.camel@pav.hide.vol.cz> <20051209165102.7b5bf038@it.buh.tecnik93.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> > > In the end we should have only new-style RCng scripts > > > (files/rc_script.in) whit ports setting USE_RC_SUBR= rc_script.in, > > > installed as such on HEAD (and sometime on 6-STABLE) and .sh added > > > for older OSVERSIONs. > > > > Other way around, leave USE_RC_SUBR=skript.sh and files/skript.sh.in, > > to avoid repo churn, and strip .sh when installing on newer > > OSVERSIONs. > > And end up with an other "historical" rule. (Q: Why are rc scripts > named .sh.in and installed w/o .sh ? A: In the past scripts used to be > sourced in a sub-shell if they had .sh .... ). And not all scripts are > apt to be installed w/o .sh (I didn't check and I don't know if they > would run and rcorder and fiends don't choke on them since they have > no keywords, maybe doug can tell us). So we have to choose between what is right and what is easy. Let's go with the hard solution then. > Testing the actual patch for bsd.port.mk is easy, > just define OSVERSION=700xx after including bsd.port.pre.mk in port's > Makefile. Turns out that existing code is aware of .sh/non-.sh scripts and deals with them, so, what about diff -a -u -r1.518 bsd.port.mk --- bsd.port.mk 8 Nov 2005 09:02:51 -0000 1.518 +++ bsd.port.mk 9 Dec 2005 15:12:11 -0000 @@ -4952,11 +4952,18 @@ .if defined(USE_RC_SUBR) && ${USE_RC_SUBR:U} != "YES" @${ECHO_CMD} "===> Installing rcNG startup script(s)" @${ECHO_CMD} "@cwd ${PREFIX}" >> ${TMPPLIST} +.if ${OSVERSION} > 700006 + @for i in ${USE_RC_SUBR}; do \ + ${INSTALL_SCRIPT} ${WRKDIR}/$${i} ${PREFIX}/etc/rc.d/$${i%.sh}; \ + ${ECHO_CMD} "etc/rc.d/$${i%.sh}" >> ${TMPPLIST}; \ + done +.else @for i in ${USE_RC_SUBR}; do \ ${INSTALL_SCRIPT} ${WRKDIR}/$${i} ${PREFIX}/etc/rc.d/$${i%.sh}.sh; \ ${ECHO_CMD} "etc/rc.d/$${i%.sh}.sh" >> ${TMPPLIST}; \ done .endif +.endif .else @${DO_NADA} .endif Content of USE_RC_SUBR can be either script.sh or script, both works. -- Pav Lucistnik <pav@oook.cz> <pav@FreeBSD.org> You can't expect to wield supreme executive power just 'cause some watery tart threw a sword at you.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1134141180.31489.3.camel>