now try to comment the line save and try to ping again.
Okay let me try to explain so you could replicate.
add the line save and ping it, it will take effect the first time,
then go to the file and comment the line save and ping it again you will see that will still pinging the 192.168.0.11 now if you reboot you will see that it is pinging to the production server again.
then if you go to edit the file again and comment out the line, it will take effect again and will ping to 192.168.0.11, now if you comment the line again and ping it you will see that it will still ping the 192.168.0.11 even after remove the comment.
so wierd han???
On Wed, 22 May 2013 22:36:01 +0000, FelipeMiranda wrote:
> Hi there I’m running OpenSUSE 12.3 and when I edit the /etc/hosts it
> does not take immediately effect?
>
> I’ve added to hosts
>
> 192.168.0.11 mywebsite.com
>
> did save and quit and when I ping it, it still pinging the production
> server?
>
> I’m kind new to opensuse am I missing something?
So in twenty seconds I went from not-resolving, to resolving, to
not-resolving, just by modifying /etc/hosts (no service restarts, no
logouts, didn’t even exit ‘vi’ in between writes to the file).
On 2013-05-24 19:11, ab wrote:
> So in twenty seconds I went from not-resolving, to resolving, to
> not-resolving, just by modifying /etc/hosts (no service restarts, no
> logouts, didn’t even exit ‘vi’ in between writes to the file).
Yes, that’s the normal behaviour.
I think I saw problems years ago with the nscd cache, long ago, not
noticing changes. I don’t remember why it was, maybe a bug.
–
Cheers / Saludos,
Carlos E. R.
(from 12.1 x86_64 “Asparagus” at Telcontar)
> 1. Normally the Hosts file is read only once during boot (or restarting
> the appropriate service)
>
> 2. Don’t forget, in openSUSE you need to make Hostname changes in <two>
> places… not only to the Hosts file but in your YAST > Network Devices
>
> TSU
I have not found the second change to be necessary in my setup, FWIW.
On 2013-05-27 16:26, tsu2 wrote:
>
> tsu2;2559824 Wrote:
>> 1. Normally the Hosts file is read only once during boot (or restarting
>> the appropriate service)
>>
>> 2. Don’t forget, in openSUSE you need to make Hostname changes in <two>
>> places… not only to the Hosts file but in your YAST > Network Devices
>
> Interesting.
> If these steps are not required any longer, it’s a relatively new
> development.
You may, some times, need change both. Sometimes the hosts file does not
end with the exact settings you want. But certainly, any change there
has immediate effects. If it doesn’t, there is a problem somewhere.
–
Cheers / Saludos,
Carlos E. R.
(from 12.1 x86_64 “Asparagus” at Telcontar)