git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 1/2] t/lib-http.sh: Restructure finding of default httpd location

From
Jay Soffian <jaysoffian@gmail.com>
Date
Nov 20, 2009, 03:14 UTC
Message-ID
<76718490911191914n23d067b8teb17907de9ec83d5@mail.gmail.com>
In-Reply-To
<1258680123-28684-1-git-send-email-tarmigan+git@gmail.com>

On Thu, Nov 19, 2009 at 8:22 PM, Tarmigan Casebolt <tarmigan+git@gmail.com> wrote:

Show 5 quoted lines
> uname might not be the best way to determine the default location for
> httpd since different Linux distributions apparently put httpd in
> different places, so we test a couple different locations for httpd,
> and use the first one that we come across.  We do the same for the
> modules directory.

Perhaps testing the distribution and looking in the known location for that distribution then? That said, going through a list of well known locations should work too.

> +for DEFAULT_HTTPD_PATH in '/usr/sbin/httpd' '/usr/sbin/apache2'
> +do
> +       test -x "$DEFAULT_HTTPD_PATH" && break
> +done

Unfortunately this leaves DEFAULT_HTTPD_PATH as the last item in the list even if the test does not pass. You can add an empty item to the end of the list if you want to do this way.

Show 7 quoted lines
> +for DEFAULT_HTTPD_MODULE_PATH in '/usr/libexec/apache2' \
> +                                 '/usr/lib/apache2/modules' \
> +                                 '/usr/lib64/httpd/modules' \
> +                                 '/usr/lib/httpd/modules'
> +do
> +       test -d "$DEFAULT_HTTPD_MODULE_PATH" && break
> +done
Ditto.
j.
Previous: Junio C HamanoNext: Tarmigan
Message 8 of 10 in “t/lib-http.sh: Restructure finding of default httpd location”
  1. 1/2 t/lib-http.sh: Restructure finding of default httpd locationTarmigan Casebolt, Nov 20, 2009
  2. 2/2 t/lib-http.sh: Enable httpd tests by default.Tarmigan Casebolt, Nov 20, 2009
  3. Junio C HamanoNov 20, 2009
  4. TarmiganNov 20, 2009
  5. Clemens BuchacherNov 20, 2009
  6. Junio C HamanoNov 20, 2009
  7. Junio C HamanoNov 20, 2009
  8. Jay SoffianNov 20, 2009
  9. TarmiganNov 20, 2009
  10. t/lib-http.sh: Restructure finding of default httpd locationTarmigan Casebolt, Jan 2, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.