You are not logged in.

#1 2019-01-25 18:47:40

snack
Member
From: Italy
Registered: 2009-01-13
Posts: 861

[SOLVED] netctl do not properly cleanup resolvconf

I noticed that when disconnecting a network the corresponding interface file is not removed:

$ ls /run/resolvconf/interfaces/
$ sudo netctl start eduroam
$ ls /run/resolvconf/interfaces/
wlan0.dhcp
$ sudo netctl stop eduroam
$ ls /run/resolvconf/interfaces/
wlan0.dhcp

I'm not an expert so I don't know whether this is the intended behavior or not; anyway, it causes a pollution of /etc/resolv.conf with the settings for wlan0 when I start a wired profile. Is this normal? Shouldn't netctl remove the interface file with a call to resolveconf - d every time that a profile is stopped?

Last edited by snack (2019-01-29 07:09:31)

Offline

#2 2019-01-27 16:14:11

Starclimber
Member
From: Mars
Registered: 2018-12-23
Posts: 13

Re: [SOLVED] netctl do not properly cleanup resolvconf

This may or may not be relevant to the "polluting" part:

https://wiki.archlinux.org/index.php/Netctl#resolv.conf

Offline

#3 2019-01-27 19:58:13

loqs
Member
Registered: 2014-03-06
Posts: 17,321

Re: [SOLVED] netctl do not properly cleanup resolvconf

DHCPReleaseOnStop=yes

Will cause dhcpcd to release the DHCP lease and if separate DNS configuration has not been specified it will also invoke the resolvconf hook which will call resolvconf -d.

Last edited by loqs (2019-01-27 19:58:36)

Offline

#4 2019-01-29 07:09:18

snack
Member
From: Italy
Registered: 2009-01-13
Posts: 861

Re: [SOLVED] netctl do not properly cleanup resolvconf

@loqs: thanks for the tip, adding DHCPReleaseOnStop=yes to my profiles fixes  the issue. I wonder why this behavior is not the default one and has to be explicitly activated, I got only trouble with DNS and search domains left over from the previous connection.

Offline

#5 2019-01-30 20:29:35

rsmarples
Member
Registered: 2009-05-12
Posts: 287

Re: [SOLVED] netctl do not properly cleanup resolvconf

snack wrote:

I wonder why this behavior is not the default one and has to be explicitly activated, I got only trouble with DNS and search domains left over from the previous connection.

Stopping is a different action from deconfiguring.
For example, you might be remoting in via ssh and upgrading dhcpcd. You want to stop the service and start a new one - if we release the lease when stopped you can't do this (well, not easily).

Now, you if want to keep dhcpcd running but just de-activate the interface you can do this

ip link set down dev eth0

dhcpcd will spot this and de-configure the interface.

This is the difference between stopping a service and stopping an interface.

Offline

Board footer

Powered by FluxBB