Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 343431 - net-misc/ndisc6 : rdnssd : wrong path in /etc/rdnssd/resolvconf hook and /etc/init.d/rdnssd
Summary: net-misc/ndisc6 : rdnssd : wrong path in /etc/rdnssd/resolvconf hook and /etc...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal with 1 vote (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-30 22:18 UTC by Maxime de Roucy
Modified: 2021-09-19 03:41 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
output of emerge --info (emerge-info,3.84 KB, text/plain)
2010-10-30 22:21 UTC, Maxime de Roucy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Maxime de Roucy 2010-10-30 22:18:39 UTC
By default files "/etc/init.d/rdnssd" and "/etc/rdnssd/resolvconf" are configured assuming that rdnssd files are located in "/var/run/".
But the real path is "/var/lib/run/" (see man rdnssd).

This cause two bugs :
- rdnssd daemon doesn't stop
- resolvconf hook doesn't work

Reproducible: Always

Steps to Reproduce:
Bug 1
1. sudo /etc/init.d/rdnssd start
2. sudo /etc/init.d/rdnssd stop
3. pgrep -l rdnssd

Bug 2
1. sudo emerge openresolv
2. sudo /etc/init.d/rdnssd start
3. rdisc6 -1 eth0
3. more /etc/resolv.conf

Actual Results:  
Bug 1
process are still running.

Bug 2
resolv.conf has not been updated

Expected Results:  
Bug 1
No remaining process

Bug 2
resolv.conf updated

to solve this bug just change : 
"/var/run/rdnssd/resolv.conf" by "/var/lib/run/rdnssd/resolv.conf" in "/etc/rdnssd/resolvconf"
"/var/run/rdnssd.pid" by "/var/lib/run/rdnssd.pid" in "/etc/init.d/rdnssd"
Comment 1 Maxime de Roucy 2010-10-30 22:21:46 UTC
Created attachment 252623 [details]
output of emerge --info
Comment 2 Michael Weber (RETIRED) gentoo-dev 2010-11-01 03:33:08 UTC
+*ndisc6-0.9.9-r1 (01 Nov 2010)
+
+  01 Nov 2010; Michael Weber <xmw@gentoo.org> -ndisc6-0.9.9.ebuild,
+  +ndisc6-0.9.9-r1.ebuild, files/rdnssd.rc, files/resolvconf:
+  Revbump to fix wrong file contents. Thanks to Maxime de Roucy
+  <maxime.deroucy@gmail.com> on bug #343431 for the report.
+
Comment 3 Michael Weber (RETIRED) gentoo-dev 2010-11-01 03:44:13 UTC
woops, the old version was stable. Just adding a new one to be stabled in 30days.

+*ndisc6-0.9.9-r1 (01 Nov 2010)
+
+  01 Nov 2010; Michael Weber <xmw@gentoo.org> +ndisc6-0.9.9-r1.ebuild,
+  +files/rdnssd.rc-1, +files/resolvconf-1:
+  Revbump to fix wrong file contents. Thanks to Maxime de Roucy
+  <maxime.deroucy@gmail.com> on bug #343431 for the report.
+
Comment 4 Benjamin Gaillard 2010-12-31 04:28:43 UTC
Actually this isn't the correct solution since the real cause to this bug is a bug in the package sources (which misuse the LOCALSTATEDIR variable). The path should be /var/run/rdnssd and not /var/lib/run/rdnssd.

This issue was addressed in the ebuild I submitted in the original bug report (bug #232249). The solution is to add a src_compile() function to the ebuild that is able to tell the configure script the path as expected by the package sources:

src_compile() {
	econf --localstatedir="${EPREFIX}"/var || die "econf failed"
	emake || die "emake failed"
}

So please revert back your changes and just add this code to the ebuild. Thanks!
Comment 5 Michael Weber (RETIRED) gentoo-dev 2011-01-03 02:31:33 UTC
further action required ...
Comment 6 Michael Weber (RETIRED) gentoo-dev 2011-01-03 02:45:48 UTC
Ok, looking at the FHS

(1) /var/lib/... the reboot preserved location (http://www.pathname.com/fhs/pub/fhs-2.3.html#PURPOSE38)

(2) /var/run/  the "state since bootup" location (http://www.pathname.com/fhs/pub/fhs-2.3.html#PURPOSE46)

hm, flipping a coin and taking (2).
explanatory statement: You probably don't wanna end up with an outdated DNS resolver information.