This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Beginnings of a patch: /etc/hosts

Script attached; comments below.

On Wed, 11 Sep 2002, Paul Johnston wrote:

> Hi,
> Brilliant to see so much progress on this!
> Are you sure that "CYGWIN_9*)" correctly catches Windows ME?

No, I'm not.  I'm incorporating Warren Young's suggestion.  Unless someone
with ME can confirm that 'uname -s' returns CYGWIN_9*?  Nicholas?

> I think we're safe with the case issue, given that cygpath -W seems to
> return the correct case.

Yes, but we are assuming that the file names are all lowercase.

> However, I think adding this belt-and-braces check might be a good idea:
> if [ ! -d "$WINETC" ]
> then
>   echo "ERROR: Directory $WINETC not found" >&2
>   exit 2
> fi

Done, but without the error code.  Should we still print a message,

> Apart from that, seems just about ready to go. Not sure if the change
> history is necessary though, at least not until it's first checked-in.
> Paul

The change history was for me to keep track of what I've done.  It should
probably be deleted when this is submitted as an official patch...  This
is my alternative to setting up a cvs repository for one file (probably
should have, though, same effort, and fewer complaints :-) ).

On Wed, 11 Sep 2002, Warren Young wrote:

> Paul Johnston wrote:
> >
> > Are you sure that "CYGWIN_9*)" correctly catches Windows ME?
> You might take a look at my alternate patch in the patches list.  It
> doesn't rely on that sort of thing -- it relies instead on well-known
> environment variables: $SYSTEMROOT and $WINDIR.  It still has some
> OS-specific knowledge in it, in that it knows that only NT-derived OSes
> define SYSTEMROOT and uses WINDIR as a fallback for 9x systems.  I don't
> know which approach is superior.

I've incorporated yours for now.  If people confirm that `uname -s`
returns either CYGWIN_NT* or CYGWIN_9* on all relevant systems, we could
revert to that mechanism.

> > However, I think adding this belt-and-braces check might be a good idea:
> I'm not a fan of the "if X, scream and die" bit in this original script
> or the one you've proposed.  Postinstall scripts shouldn't fail.  I
> think they should give best effort, and if they can't do what you want,
> they should simply quietly skip that bit.  Besides, this patch may be
> put into some other postinstall script, and you don't want to avoid
> doing the other tasks in that script just because the /etc/hosts part
> can't find the Windows system directory.

Well, we should at least refrain from making the symlinks then...
On another note, I'm not sure why you were checking for the presence of
the windows files.  We could still create dangling symlinks if they are
missing, which will allow the files to be created by editing/saving the
      |\      _,,,---,,_
ZZZzz /,`.-'`'    -.  ;-;;,_
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

It took the computational power of three Commodore 64s to fly to the moon.
It takes a 486 to run Windows 95.  Something is wrong here. -- SC sig file

Description: Text document

Description: Text document

Unsubscribe info:
Bug reporting:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]