Discussion:
Hosts file
Martin Gainty
2003-03-25 17:07:26 UTC
Permalink
Where does cygwin look for hosts file ?
Thanks,
Martin
Igor Pechtchanski
2003-03-25 17:16:06 UTC
Permalink
Post by Martin Gainty
Where does cygwin look for hosts file ?
Thanks, Martin
Cygwin is a layer on top of Windows, and it uses the Windows machinery to
implement networking. Thus, the question is: where does Windows look for
the "hosts" file? And the answer to that is Windows version-specific, and
could be found by a judicious application of a Google search...

That being said, as a convenience to its users, Cygwin provides a symbolic
link to the Windows hosts file in a standard POSIX place, i.e.,
/etc/hosts. There are also links to other standard files, such as
/etc/networks, /etc/services, and /etc/protocols.
Igor
--
http://cs.nyu.edu/~pechtcha/
|\ _,,,---,,_ ***@cs.nyu.edu
ZZZzz /,`.-'`' -. ;-;;,_ ***@watson.ibm.com
|,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski
'---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow!

Oh, boy, virtual memory! Now I'm gonna make myself a really *big* RAMdisk!
-- /usr/games/fortune
Thorsten Kampe
2003-03-25 17:26:49 UTC
Permalink
* Martin Gainty (03-03-25 18:07 +0100)
Post by Martin Gainty
Where does cygwin look for hosts file ?
"Cygwin" doesn't care about "hosts". The applications are looking for
it in /etc and it is symlinked to the Windows default file in
%SYSTEMROOT%\system32\drivers\etc\.

Thorsten
--
Content-Type: text/explicit; charset=ISO-8859-666 (Parental Advisory)
Content-Transfer-Warning: message contains innuendos not suited for
children under the age of 18
Igor Pechtchanski
2003-03-25 17:33:23 UTC
Permalink
Post by Thorsten Kampe
* Martin Gainty (03-03-25 18:07 +0100)
Post by Martin Gainty
Where does cygwin look for hosts file ?
"Cygwin" doesn't care about "hosts". The applications are looking for
it in /etc and it is symlinked to the Windows default file in
%SYSTEMROOT%\system32\drivers\etc\.
Thorsten
<pedantic>The applications (through wsock32.dll) look for it in the
standard Windows place, which is %SYSTEMROOT%\system32\drivers\etc\ on
WinNT/2k/XP and %WINDIR%\ on Win9x. The symlink is for the
users.</pedantic>
Igor
--
http://cs.nyu.edu/~pechtcha/
|\ _,,,---,,_ ***@cs.nyu.edu
ZZZzz /,`.-'`' -. ;-;;,_ ***@watson.ibm.com
|,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski
'---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow!

Oh, boy, virtual memory! Now I'm gonna make myself a really *big* RAMdisk!
-- /usr/games/fortune
Thorsten Kampe
2003-03-25 18:39:05 UTC
Permalink
* Igor Pechtchanski (03-03-25 18:33 +0100)
Post by Igor Pechtchanski
Post by Thorsten Kampe
* Martin Gainty (03-03-25 18:07 +0100)
Post by Martin Gainty
Where does cygwin look for hosts file ?
"Cygwin" doesn't care about "hosts". The applications are looking for
it in /etc and it is symlinked to the Windows default file in
%SYSTEMROOT%\system32\drivers\etc\.
Thorsten
<pedantic>The applications (through wsock32.dll) look for it in the
standard Windows place, which is %SYSTEMROOT%\system32\drivers\etc\ on
WinNT/2k/XP and %WINDIR%\ on Win9x. The symlink is for the
users.</pedantic>
Well, I thought some /applications/ were explictly looking and
complaining for the existence of the "most important" files on a Unix
host and this was the reason for the hosts, networks, services and
protocols links.

Thorsten
--
Content-Type: text/explicit; charset=ISO-8859-666 (Parental Advisory)
Content-Transfer-Warning: message contains innuendos not suited for
children under the age of 18
Igor Pechtchanski
2003-03-25 18:47:38 UTC
Permalink
Post by Thorsten Kampe
* Igor Pechtchanski (03-03-25 18:33 +0100)
Post by Igor Pechtchanski
Post by Thorsten Kampe
* Martin Gainty (03-03-25 18:07 +0100)
Post by Martin Gainty
Where does cygwin look for hosts file ?
"Cygwin" doesn't care about "hosts". The applications are looking for
it in /etc and it is symlinked to the Windows default file in
%SYSTEMROOT%\system32\drivers\etc\.
Thorsten
<pedantic>The applications (through wsock32.dll) look for it in the
standard Windows place, which is %SYSTEMROOT%\system32\drivers\etc\ on
WinNT/2k/XP and %WINDIR%\ on Win9x. The symlink is for the
users.</pedantic>
Well, I thought some /applications/ were explictly looking and
complaining for the existence of the "most important" files on a Unix
host and this was the reason for the hosts, networks, services and
protocols links.
Thorsten
I am not aware of any. AFAIK (and I should, I participated in the
creation of the package that makes them) the links are purely for user
convenience (and uniformity).
Igor
--
http://cs.nyu.edu/~pechtcha/
|\ _,,,---,,_ ***@cs.nyu.edu
ZZZzz /,`.-'`' -. ;-;;,_ ***@watson.ibm.com
|,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski
'---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow!

Oh, boy, virtual memory! Now I'm gonna make myself a really *big* RAMdisk!
-- /usr/games/fortune
Martin Gainty
2003-03-25 17:51:53 UTC
Permalink
Great!
I am doing a make of mysql and am getting the error:

libmysqld/sql_derived.cc: You are trying to create a symlink on a win32 file
system.
This file type is not supported on this platform.

How do I correctly identify file types to cygwin and
correct this error situation?
Sorry for the bother!
Thanks,
Martin

----- Original Message -----
From: "Thorsten Kampe" <***@thorstenkampe.de>
To: <***@cygwin.com>
Sent: Tuesday, March 25, 2003 10:26 AM
Subject: Re: Hosts file
Post by Thorsten Kampe
* Martin Gainty (03-03-25 18:07 +0100)
Post by Martin Gainty
Where does cygwin look for hosts file ?
"Cygwin" doesn't care about "hosts". The applications are looking for
it in /etc and it is symlinked to the Windows default file in
%SYSTEMROOT%\system32\drivers\etc\.
Thorsten
--
Content-Type: text/explicit; charset=ISO-8859-666 (Parental Advisory)
Content-Transfer-Warning: message contains innuendos not suited for
children under the age of 18
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
Thorsten Kampe
2003-03-25 18:33:24 UTC
Permalink
* Martin Gainty (03-03-25 18:51 +0100)
Post by Martin Gainty
libmysqld/sql_derived.cc: You are trying to create a symlink on a win32 file
system.
This file type is not supported on this platform.
What has that got to do with /etc/hosts? No application running under
Cygwin knows that /cygdrive/c/WINDOWS/system32/drivers/etc/hosts is in
fact %SYSTEMROOT%\system32\drivers\etc\hosts.

Thorsten
--
Content-Type: text/explicit; charset=ISO-8859-666 (Parental Advisory)
Content-Transfer-Warning: message contains innuendos not suited for
children under the age of 18
Continue reading on narkive:
Loading...