Re: Stuck On Trying to Get resolvconf to Update /etc/resolv.conf
Jeremy Hansen
Sat Nov 18 01:41:59 2017Oops, at some point we got off the mailing list. I'm forwarding this there to ensure it's available in case someone comes across it with a search. ---------- Forwarded message ---------- From: Jeremy Hansen <jebrhansen+SBo@xxxxxxxxx> Date: Thu, Nov 16, 2017 at 9:03 PM Subject: Re: [openresolv-discuss] Stuck On Trying to Get resolvconf to Update /etc/resolv.conf To: Roy Marples <roy@xxxxxxxxxxxx> On Thu, Nov 16, 2017 at 9:22 AM, Roy Marples <roy@xxxxxxxxxxxx> wrote: > On 16/11/2017 13:56, Roy Marples wrote: > >> On 16/11/2017 13:29, Jeremy Hansen wrote: >> >>> Thanks Roy! This gives me a lot to go on. I also posted this on the >>> Slackware forum <https://www.linuxquestions.or >>> g/questions/showthread.php?p=5781327#post5781327> on LinuxQuestions and >>> I think the other user you mentioned replied. I will be tackling this >>> tonight when I get home from work. I will say that I don't have a separate >>> /usr/ partition, so having the script in /usr/sbin/ isn't an issue here, >>> but I will contact the SBo admins and see if they have any issues with >>> putting it in /sbin/. Once I get all of this figured out, I'll propose to >>> take over maintainership of the SlackBuild and incorporate the needed >>> changes to get this script to work without much hassle (the original author >>> hasn't updated it since 2013, and the only changes have been done by the >>> admins). >>> >> >> That would be nice! >> openresolv itself as of 3.9.0 has no reported errors and is proving >> highly reliable. >> >> I find Linux disk layout odd. The subscribers are not arch specific, they >> are shell scripts! So they really don't belong in /lib or any derivative >> thereof. This is why we have /libexec, but that only appears to be popular >> on BSD platforms even though it's a long time default of GNU configure. >> > > On that note, if you do move resolvconf to /sbin, you should also move the > subscribers to /lib (or /libexec as intended) as well. > There should not be any need to use any sed magic, configure options > should be enough. > > Roy > With a quick look at it, it seems like it was a mix of two things. First, the original maintainer didn't include specifying a libexecdir configure option, which means it defaults to /usr/lib/ since Slackware doesn't have /libexec/. This wouldn't be an issue on a 32bit install, but then the maintainer ended up moving /usr/lib/ to /usr/lib64/ on 64bit installs without adjusting it in the script. So, adding the libexecdir option to the ./configure to /usr/libexec/ and then removing the section of code in the SlackBuild that moves /usr/lib/ to /usr/lib64/ allows the script to find the required files. One minor suggestion, since it seems like you're already checking for /libexec/, if that isn't found, maybe it could then check for /usr/libexec/ (which does exist on Slackware and probably other distros since it's part of the FHS 3.0 specification where /libexec/ isn't) and use that unless overridden by libexecdir with configure. Unfortunately, after some testing, I'm ran into some issues that I eventually figured out, but figured it might be good to make you aware of them (and have them documented in case anyone else runs into similar problems and finds this on your mailing list archive.. The issue I ran into was when I ran the command of echo "nameserver 8.8.8.8" | resolvconf -a tun0.inet, I get the help output from /usr/libexec/Xorg stating it doesn't recognize option "a". I can got around that by using it in conjunction with the -u option, which will update /etc/resolv.conf, but that didn't work when I tried to delete the interface with the -d option. I'd get the same error. However, what I found after running the script using bash -x is that it was running all the files in /usr/libexec/. I had to change my configure option from --libexecdir=/usr/libexec to --libexecdir=/usr/libexec/openresolv. This created a directory for the files needed by openresolv (since I assume now that it just runs all files within it's specified libexec directory, so if you don't provide the script its own directory, it will run everything else in there... which you don't want). Now it seems everything is working fine, both when I add tun0.inet and remove it. /etc/resolv.conf is updated in both cases. Thanks for the great program and the assistance with the script. I'll get an update pushed out to slackbuilds.org so others don't run into the same issue. Thanks again Jeremy
Archive administrator: postmaster@marples.name