Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #255345
| From | Greg Wooledge <greg@wooledge.org> |
|---|---|
| Newsgroups | linux.debian.user |
| Subject | Re: Debugging what is deleting/recreating /etc/resolv.conf with wrong configuration, on debian stable |
| Date | 2023-02-24 13:30 +0100 |
| Message-ID | <G2Fn3-89Ol-5@gated-at.bofh.it> (permalink) |
| References | <G20WC-7JT0-5@gated-at.bofh.it> <G24xb-7M9K-17@gated-at.bofh.it> <G2goF-7TM7-1@gated-at.bofh.it> <G2yYh-85Ai-5@gated-at.bofh.it> <G2CyR-87VI-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Fri, Feb 24, 2023 at 10:19:38AM +0100, davenull@tuxfamily.org wrote:
> However, I didn't notice any vnpc_script malfunction. It does what it is
> expected to do. I'm like 99% sure the problem is dhclient deleting and
> recreating /etc/resolv.conf as it sees fit, multiple times a day, and
> deleting whatever vpnc_script has put in that file.
Then use one of the methods listed at <https://wiki.debian.org/resolv.conf>
to address that, and see if it fixes the problem.
The simplest one to test would be
<https://wiki.debian.org/resolv.conf#Configuring_dhclient>. It doesn't
involve installing any new packages.
If your testing is successful (e.g. a whole day goes by and the
resolv.conf file is not unexpectedly altered), then things get a little
bit trickier. If I understand correctly, you're working on a laptop,
and your desired configuration is:
* At boot time, allow the DHCP client to set up resolv.conf.
* Once that has been done, disallow all further modifications of
resolv.conf by the DHCP client.
* Allow modifications of resolv.conf by vpnc_script at any time.
The tricky part here is how to write a function that determines whether
dhclient should be allowed to modify the file ("is it boot time") or not.
Perhaps you could use something awful like "if the system uptime is less
than 5 minutes, allow it".
Another hack that comes to mind would be writing something that removes
the resolv.conf file at shutdown time. Then, the dhclient hook function
would allow dhclient to write the file if and only if it doesn't exist.
Or... the reverse of this. Keep a second file which serves as a flag
indicating that the resolv.conf file has already been configured once.
Remove this flag at boot time (make sure that happens *early*, before
dhclient is started), and then write your dhclient hook function to
allow the modification if and only if the flag file doesn't exist. Then
create the flag file after doing the modification.
I'm not sure which of those is the least bad. Maybe you can come up
with some other ideas.
Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Debugging what is deleting/recreating /etc/resolv.conf with wrong configuration, on debian stable davenull@tuxfamily.org - 2023-02-22 18:20 +0100
Re: Debugging what is deleting/recreating /etc/resolv.conf with wrong configuration, on debian stable Roberto C. Sánchez <roberto@debian.org> - 2023-02-22 18:30 +0100
Re: Debugging what is deleting/recreating /etc/resolv.conf with wrong configuration, on debian stable Christoph Brinkhaus <c.brinkhaus@t-online.de> - 2023-02-22 18:40 +0100
Re: Debugging what is deleting/recreating /etc/resolv.conf with wrong configuration, on debian stable davenull@tuxfamily.org - 2023-02-23 11:40 +0100
Re: Debugging what is deleting/recreating /etc/resolv.conf with wrong configuration, on debian stable Reco <recoverym4n@enotuniq.net> - 2023-02-23 18:20 +0100
Re: Debugging what is deleting/recreating /etc/resolv.conf with wrong configuration, on debian stable Greg Wooledge <greg@wooledge.org> - 2023-02-22 19:30 +0100
Re: Debugging what is deleting/recreating /etc/resolv.conf with wrong configuration, on debian stable David Wright <deblis@lionunicorn.co.uk> - 2023-02-22 22:10 +0100
Re: Debugging what is deleting/recreating /etc/resolv.conf with wrong configuration, on debian stable davenull@tuxfamily.org - 2023-02-23 10:50 +0100
Re: Debugging what is deleting/recreating /etc/resolv.conf with wrong configuration, on debian stable <tomas@tuxteam.de> - 2023-02-23 11:00 +0100
Re: Debugging what is deleting/recreating /etc/resolv.conf with wrong configuration, on debian stable davenull@tuxfamily.org - 2023-02-23 11:40 +0100
Re: Debugging what is deleting/recreating /etc/resolv.conf with wrong configuration, on debian stable David Wright <deblis@lionunicorn.co.uk> - 2023-02-24 06:40 +0100
Re: Debugging what is deleting/recreating /etc/resolv.conf with wrong configuration, on debian stable <tomas@tuxteam.de> - 2023-02-24 06:50 +0100
Re: Debugging what is deleting/recreating /etc/resolv.conf with wrong configuration, on debian stable davenull@tuxfamily.org - 2023-02-24 10:30 +0100
Re: Debugging what is deleting/recreating /etc/resolv.conf with wrong configuration, on debian stable <tomas@tuxteam.de> - 2023-02-24 10:30 +0100
Re: Debugging what is deleting/recreating /etc/resolv.conf with wrong configuration, on debian stable davenull@tuxfamily.org - 2023-02-24 11:30 +0100
Re: Debugging what is deleting/recreating /etc/resolv.conf with wrong configuration, on debian stable tomas@tuxteam.de - 2023-02-24 11:50 +0100
Re: Debugging what is deleting/recreating /etc/resolv.conf with wrong configuration, on debian stable davenull@tuxfamily.org - 2023-02-27 15:20 +0100
Re: Debugging what is deleting/recreating /etc/resolv.conf with wrong configuration, on debian stable Greg Wooledge <greg@wooledge.org> - 2023-02-27 15:40 +0100
Re: Debugging what is deleting/recreating /etc/resolv.conf with wrong configuration, on debian stable Greg Wooledge <greg@wooledge.org> - 2023-02-24 13:30 +0100
Re: Debugging what is deleting/recreating /etc/resolv.conf with wrong configuration, on debian stable David Wright <deblis@lionunicorn.co.uk> - 2023-02-25 01:30 +0100
Forcing dhclient to not ignore tun0 interface when it's available davenull@tuxfamily.org - 2023-03-02 11:50 +0100
Re: Forcing dhclient to not ignore tun0 interface when it's available Tim Woodall <debianuser@woodall.me.uk> - 2023-03-03 04:10 +0100
Re: Forcing dhclient to not ignore tun0 interface when it's available Max Nikulin <manikulin@gmail.com> - 2023-03-03 06:30 +0100
Re: Forcing dhclient to not ignore tun0 interface when it's available Tim Woodall <debianuser@woodall.me.uk> - 2023-03-03 07:40 +0100
Re: Forcing dhclient to not ignore tun0 interface when it's available Max Nikulin <manikulin@gmail.com> - 2023-03-03 16:10 +0100
Re: Forcing dhclient to not ignore tun0 interface when it's available David Wright <deblis@lionunicorn.co.uk> - 2023-03-03 16:20 +0100
Re: Forcing dhclient to not ignore tun0 interface when it's available davenull@tuxfamily.org - 2023-03-06 13:40 +0100
Re: Forcing dhclient to not ignore tun0 interface when it's available David Wright <deblis@lionunicorn.co.uk> - 2023-03-07 05:10 +0100
Re: Forcing dhclient to not ignore tun0 interface when it's available davenull@tuxfamily.org - 2023-03-07 17:20 +0100
Re: Forcing dhclient to not ignore tun0 interface when it's available David Wright <deblis@lionunicorn.co.uk> - 2023-03-10 02:00 +0100
Re: Forcing dhclient to not ignore tun0 interface when it's available davenull@tuxfamily.org - 2023-03-06 13:20 +0100
Re: Forcing dhclient to not ignore tun0 interface when it's available David Wright <deblis@lionunicorn.co.uk> - 2023-03-07 05:10 +0100
Re: Forcing dhclient to not ignore tun0 interface when it's available davenull@tuxfamily.org - 2023-03-07 17:00 +0100
Re: Forcing dhclient to not ignore tun0 interface when it's available Max Nikulin <manikulin@gmail.com> - 2023-03-07 16:30 +0100
Re: Forcing dhclient to not ignore tun0 interface when it's available davenull@tuxfamily.org - 2023-03-07 18:00 +0100
Re: Forcing dhclient to not ignore tun0 interface when it's available David Wright <deblis@lionunicorn.co.uk> - 2023-03-10 02:00 +0100
Re: Forcing dhclient to not ignore tun0 interface when it's available davenull@tuxfamily.org - 2023-03-10 09:50 +0100
Re: Forcing dhclient to not ignore tun0 interface when it's available David Wright <deblis@lionunicorn.co.uk> - 2023-03-03 06:30 +0100
Re: Forcing dhclient to not ignore tun0 interface when it's available davenull@tuxfamily.org - 2023-03-03 18:10 +0100
Re: Forcing dhclient to not ignore tun0 interface when it's available David Wright <deblis@lionunicorn.co.uk> - 2023-03-04 18:40 +0100
Re: Debugging what is deleting/recreating /etc/resolv.conf with wrong configuration, on debian stable Cindy Sue Causey <butterflybytes@gmail.com> - 2023-02-23 02:30 +0100
Re: Debugging what is deleting/recreating /etc/resolv.conf with wrong configuration, on debian stable conover@panix.com (John Conover) - 2023-02-23 03:20 +0100
Re: Debugging what is deleting/recreating /etc/resolv.conf with wrong configuration, on debian stable davenull@tuxfamily.org - 2023-02-23 11:30 +0100
Re: Debugging what is deleting/recreating /etc/resolv.conf with wrong configuration, on debian stable Jeremy Ardley <jeremy@ardley.org> - 2023-02-23 11:40 +0100
Re: Debugging what is deleting/recreating /etc/resolv.conf with wrong configuration, on debian stable David Wright <deblis@lionunicorn.co.uk> - 2023-02-28 05:30 +0100
Re: Debugging what is deleting/recreating /etc/resolv.conf with wrong configuration, on debian stable davenull@tuxfamily.org - 2023-02-28 16:10 +0100
Re: Debugging what is deleting/recreating /etc/resolv.conf with wrong configuration, on debian stable Tixy <tixy@yxit.co.uk> - 2023-02-28 17:00 +0100
Re: Debugging what is deleting/recreating /etc/resolv.conf with wrong configuration, on debian stable David Wright <deblis@lionunicorn.co.uk> - 2023-03-02 00:30 +0100
Re: Debugging what is deleting/recreating /etc/resolv.conf with wrong configuration, on debian stable davenull@tuxfamily.org - 2023-03-02 10:40 +0100
Re: Debugging what is deleting/recreating /etc/resolv.conf with wrong configuration, on debian stable Greg Wooledge <greg@wooledge.org> - 2023-03-02 13:40 +0100
Re: Debugging what is deleting/recreating /etc/resolv.conf with wrong configuration, on debian stable davenull@tuxfamily.org - 2023-03-02 13:50 +0100
Re: Debugging what is deleting/recreating /etc/resolv.conf with wrong configuration, on debian stable davenull@tuxfamily.org - 2023-03-02 14:10 +0100
Re: Debugging what is deleting/recreating /etc/resolv.conf with wrong configuration, on debian stable Greg Wooledge <greg@wooledge.org> - 2023-03-02 14:20 +0100
Re: Debugging what is deleting/recreating /etc/resolv.conf with wrong configuration, on debian stable davenull@tuxfamily.org - 2023-03-02 16:20 +0100
Re: Debugging what is deleting/recreating /etc/resolv.conf with wrong configuration, on debian stable David <bouncingcats@gmail.com> - 2023-03-02 16:40 +0100
Re: Debugging what is deleting/recreating /etc/resolv.conf with wrong configuration, on debian stable David <bouncingcats@gmail.com> - 2023-03-02 16:20 +0100
Re: Debugging what is deleting/recreating /etc/resolv.conf with wrong configuration, on debian stable Curt <curty@free.fr> - 2023-03-02 18:30 +0100
Re: Debugging what is deleting/recreating /etc/resolv.conf with wrong configuration, on debian stable David Wright <deblis@lionunicorn.co.uk> - 2023-03-02 19:20 +0100
Re: Debugging what is deleting/recreating /etc/resolv.conf with wrong configuration, on debian stable <tomas@tuxteam.de> - 2023-03-02 20:30 +0100
Re: Debugging what is deleting/recreating /etc/resolv.conf with wrong configuration, on debian stable David Wright <deblis@lionunicorn.co.uk> - 2023-03-03 06:20 +0100
csiph-web