Bug 121479 - Port startup script don't get values from /etc/rc.conf (ports/www/apache13-modssl)
Summary: Port startup script don't get values from /etc/rc.conf (ports/www/apache13-mo...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Dirk Meyer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-07 21:10 UTC by Vlad
Modified: 2008-05-12 13:04 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vlad 2008-03-07 21:10:03 UTC
Hi!

When I've tried to set "apache_flags" in /etc/rc.conf, server starts (on host boot time) with default values from /usr/local/etc/rc.d/apache.sh

After manual Apache restart
# /usr/local/etc/rc.d/apache.sh restart
it gets proper values from /etc/rc.conf

I've tried in /etc/rc.conf:
apache_flags=""
apache_flags="NoFlags"

with same result.

apache+mod_ssl-1.3.39+2.8.30

Thanks.

Vlad.

How-To-Repeat: Reboot the server.
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2008-03-07 21:10:08 UTC
Responsible Changed
From-To: freebsd-ports-bugs->dinoex

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Dirk Meyer freebsd_committer freebsd_triage 2008-03-17 13:08:22 UTC
State Changed
From-To: open->feedback


in /etc/rc.conf 
apache_flags="" 

this works here as expectedm, 
check with "ps" as it shows the args passed. 

Please verify, how you see the default flags.
Comment 3 Laurent Frigault 2008-05-08 14:13:19 UTC
No this only works when the system is already running and you are using
/usr/local/etc/rc.d/apache.sh start
or
/usr/local/etc/rc.d/apache.sh restart

But it does not works when rebooting the system.

Try with apache_flags="" in /etc.rc.conf

Replacing apache_flags="-DSSL" with apache_flags=${apache_flags-"-DSSL"}
in /usr/local/etc/rc.d/apache.sh seems to fix the problem.

The following patch should fix the problem

# diff -u files/rcng.sh.orig files/rcng.sh 
--- files/rcng.sh.orig  2008-05-08 15:05:46.000000000 +0200
+++ files/rcng.sh       2008-05-08 15:06:15.000000000 +0200
@@ -14,7 +14,7 @@
 # DO NOT CHANGE THESE DEFAULT VALUES HERE
 #
 apache_enable="${apache_enable-NO}"
-apache_flags="-DSSL"
+apache_flags=${apache_flags-"-DSSL"}
 apache_pidfile="/var/run/httpd.pid"
 
 . %%RC_SUBR%%

Regards,
-- 
Laurent Frigault | <url:http://www.agneau.org/>
Comment 4 dfilter service freebsd_committer freebsd_triage 2008-05-12 12:40:34 UTC
dinoex      2008-05-12 11:40:28 UTC

  FreeBSD ports repository

  Modified files:
    www/apache13-modssl/files rcng.sh 
  Log:
  - fix custom apache_flags
  PR:             121479
  Submitted by:   Laurent Frigault
  
  Revision  Changes    Path
  1.6       +2 -2      ports/www/apache13-modssl/files/rcng.sh
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 5 Dirk Meyer freebsd_committer freebsd_triage 2008-05-12 13:04:09 UTC
State Changed
From-To: feedback->closed

committed, thanks.