Due to an error in the Makefile for the www/apache13 port, the startup script installed for the apache13 port does not function correctly. The makefile uses sed to replace occurences of '%%PREFIX%%' in a template script (files/apache.sh) with a real path, usually /usr/local. However, due to a lack of 'g' option on the sed statement, only the first instance of %%PREFIX%% on any given line is replaced. Hence, this line in the template file: [ -x %%PREFIX%%/sbin/apachectl ] && %%PREFIX%%/sbin/apachectl start > /d ev/null && echo -n ' apache' should end up like: [ -x /usr/local/sbin/apachectl ] && /usr/local/sbin/apachectl start > /d ev/null && echo -n ' apache' but in fact ends up like: [ -x /usr/local/sbin/apachectl ] && %%PREFIX%%/sbin/apachectl start > /d ev/null && echo -n ' apache' This is sufficient to make the script non-functional and prevent apache from being started at boot. Fix: There are a couple of fixes: 1. One could manually edit /usr/local/etc/rc.d/apache.sh and replace the missed instance of %%PREFIX%% with the correct path. 2. One could edit the apache13 makefile and add the 'g' option to the relevant sed statement e.g. post-extract: @${SED} -e "s=%%PREFIX%%=${PREFIX}=g" ${FILESDIR}/apache.sh \ > ${WRKSRC}/apache.sh sed would then replace %%PREFIX%% globally on each line of the startup script, instead of just the first instance. How-To-Repeat: Install the current apache13 port with the Makefile dated as follows: # $FreeBSD: ports/www/apache13/Makefile,v 1.110 2002/04/22 03:26:11 dinoex Exp $ #
State Changed From-To: open->closed Fixed