This is the mail archive of the
mailing list for the Cygwin project.
Re: Beginnings of a patch: /etc/hosts
Paul Johnston wrote:
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.
Are you sure that "CYGWIN_9*)" correctly catches Windows ME?
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.
However, I think adding this belt-and-braces check might be a good idea:
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html