Re: PATCH: CygWin port enhancement - 2nd revision

From: Guido Serassio <serassio@dont-contact.us>
Date: Fri, 17 Aug 2001 22:01:30 +0200

Hi,

Il 09.53 17/08/2001 Henrik Nordstrom ha scritto:
>Guido Serassio wrote:
>
> > We have 3 different scenarios:
> >
> > 1) True *nix systems: host file can be only /etc/hosts, so default =
> > /etc/host is OK.
>
>True.
>
> > 2) Native WIN32 systems: host file can be only on win system directory,
> > different between 9x and NT (Argh !!!), so a default is platform dependent.
>
>And as Squid assigns default values at build time and documents the default in
>squid.conf, this is a big problem unless you are willing to accept different
>builds for NT and Windows, or to have a default list of different paths
>covering
>the variants of the platform.
>
> > Scenarios 1) and 2) can be resolved with a new "default" keyword, with
> > run-time platform recognition.
>
>True, but I don't like to have paths hardcoded into Squid, and I'd like to
>keep
>the feature of having default values automatically documented in squid.conf to
>match the build.
>
> > Scenario 3) Problems comes from the potential existance of 2 different host
> > file, but i think that this is a very big CygWin bug:
>
>As far as I am concerned, the problem is mainly the difference between NT
>and 9X.
>For CygWin it is acceptable to say that for /etc/hosts to be read by Squid you
>must either
> a) Set up a symlink in /etc/hosts
> b) Configure hosts_file to match the Windows version
>but for a native WIN32 port, the default should be found automatically, and it
>should be shown how in the configuration.
>
>--
>Henrik

My proposal is to have 3 values for hosts_files: none, default and "path".

- none = no host file used
- default = default platform host file with run-time configuration, with
the following values:
         *nix ==> /etc/hosts
         Cygwin ==> try /etc/hosts first, and on failure like native WIN32
         native WIN32 on 9x ==> %windir%\hosts
         native NT/2000/XP ==> %systemroot%\system32\drivers\etc\hosts
- "path" = user specified path

All must be well documented in squid.conf.

As default settings, I like to use "default".

Guido

-
=======================================================
Serassio Guido
Via Albenga, 11/4 10134 - Torino - ITALY
Tel. : +39.011.610749
E-mail: serassio@interfree.it
         serassio@libero.it
WWW: http://www.serassio.it
Received on Fri Aug 17 2001 - 14:01:44 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:14:12 MST