On Mon, 27 May 2002, Joshua Slive wrote: > > On Mon, 27 May 2002, William A. Rowe, Jr. wrote: > > >- Having two different sets of arguments for httpd and apachectl is > > >confusing and difficult to document > > > > How so? How is this different from syntax differences between any > > other two commands? Here is a wrapper used by administrators for > > five years, and you want to change the syntax "just because"? > > Because any time someone tells you to use command line option "-xxx" (to > activate apache's porno mode, perhaps), you need to figure out where the > heck it goes and how to get it there. I'm not saying it's the end of the > world, I'm saying it's added complexity that we should remove if we can.
There should be a wrapper script that starts Apache in the proper mode for "normally" running a given instance on a given system. If they want to always have the porno mode enabled, then it should be added to the configuration of that script, not specified on the command line as an argument to that script. If they want to start with porno mode just for some special testing, then they need to be able to pass that command line option to httpd somehow; in the past, this would just be by running it manually with all the options. Since we now require other random stuff to be done before running httpd, we either need a script that does that or we need a way for the wrapper script to pass httpd options through. The wrapper script, however, is not normally designed to be used in a mode where a bunch of command line options are passed to it every time it is run. > The fact that apachectl's arguments are standard for init scripts was > something I had forgotten about. It isn't just that its arguments are standard for init scripts, it _IS_ an init script. I am wary of trying to overload it to be both an init script and a magic-httpd-wrapper-that-takes-any-argument script. Some complexity comes from having two different things that can be run, the init script and the program itself directly. But I think even more complexity comes from having one thing that magically plays both roles, especially if it is not designed very carefully to play both roles. > > > I have an entirely different approach we might want to consider. Rather > > than implement -k, deprecate the -k flag in Win32. Apache takes no > > arguments today, only options. Introducing a single argument doesn't > > seem like a bad compromise. > > That was my favorite option from the beginning. But I'm not sure how easy > it would be to implement with the currect getargs code. I've never been a big fan of programs that take some arguments as magic words on the command line, some as options, etc. There are various standards for command line usage, and I don't know that having command lines like "httpd start" fits into any of them. How is this different than an init script taking a "start" option? Mostly a matter of convention; init scripts are a well understood and widely used concept, and generally only have the one argument passed to them without a bunch of other command line options.
