[opensuse] Re: modify_resolvconf vs netconfig: best practice to setup resolv.conf
Per Jessen wrote:
Joachim Schrod wrote:
Just to repeat my use case: I connect to my Wifi network. Then netconfig sets up resolv.conf to use the name server on that network. That's OK most of the time when I'm at customer's sites or so. But at my company, when I use OpenVPN to get into our Intranet, I want to use the Intranet's nameserver as long as I'm connected via VPN. When I disconnect, the Wifi nameserver configuration shall be reestablished again. That worked perfectly with /sbin/modify_resolvconf.
I haven't grasped what I need to do to have the same effect with netconfig. I.e., what needs to go into /etc/sysconfig/network/config and how I need to call netconfig in the OpenVPN connection hook.
Maybe a silly suggestion, but have you considered simply copying /sbin/modify_resolvconf from an older system and just keep using it? Your setup is clearly custom anyway, so a little bit more won't hurt :-)
Thanks, that was it, eventually. Actually, using /sbin/modify_resolvconf is what I'm currently doing. But I wanted to understand what's the supported way to handle my use case, since this is a rather standard usage of OpenVPN and there's not much customization going on beyond declaration of certs and IP addresses. So I looked again at openvpn's package content and found /usr/share/doc/packages/openvpn/sample-scripts/client-netconfig.{up,down} which encode netconfig usage. I really thought I checked there but seemed to have overlooked these files. Joachim -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Joachim Schrod Email: jschrod@acm.org Roedermark, Germany -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (1)
-
Joachim Schrod