Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: [SOLVED] Issues with dhcpcd-openrc (Read 1892 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

[SOLVED] Issues with dhcpcd-openrc

I think I've come across an issue with dhcpcd-openrc.

/etc/init.d/dhcpcd specifies "pidfile=/run/dhcpcd.pid" but dhcpcd itself puts its pidfile into /run/dhcpcd/pid.  Whilst everything still works correctly, openrc expects the pidfile to be somewhere it's not, finds it's missing and assumes that it's crashed, as can be seen in both rc-status and "rc-service dhcpcd status" and won't allow "rc-service dhcpcd stop" to work correctly.

Changing the pidfile line in the init script resolves the issue.

Thanks again for all your good work.

Re: Issues with dhcpcd-openrc

Reply #1
Taking a look at this issue

Seems using supervisor=supervise-daemon should fix this, as it will keep up with the pid fine and also assigning a pid manually could be an issue due to interface name also being used affects pidname in the current pkg

If you can, know how to build a pkg from a PKGBUILD, well easy to say how makepkg -si(will install missing deps and install), you can test out this updated version I made:
https://gitea.artixlinux.org/ndowens/packages-openrc/src/branch/master/dhcpcd-openrc You'd need to download both the *.initd file and PKGBUILD and run makepkg -si in the same dir as those files. I am testing it currently and so far it seems to work without crashing

Re: Issues with dhcpcd-openrc

Reply #2
Yes, that certainly works fine here.

Out of interest, is there any particular reason why supervise-daemon isn't used throughout ALL the scripts?  It seems to simplify individual scripts as you no longer need to specify the pidfile location.

Thanks, Dave

Re: Issues with dhcpcd-openrc

Reply #3
Yes, that certainly works fine here.

Out of interest, is there any particular reason why supervise-daemon isn't used throughout ALL the scripts?  It seems to simplify individual scripts as you no longer need to specify the pidfile location.

Thanks, Dave
Most of the time it isn't needed, sometimes one works better than the other

 

Re: Issues with dhcpcd-openrc

Reply #4
Great, thanks for your help and the quick fix.