Artix Linux Forum

Init systems => OpenRC => Topic started by: Dave on 02 June 2020, 21:17:38

Title: [SOLVED] Issues with dhcpcd-openrc
Post by: Dave on 02 June 2020, 21:17:38
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.
Title: Re: Issues with dhcpcd-openrc
Post by: ndowens on 02 June 2020, 21:47:15
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
Title: Re: Issues with dhcpcd-openrc
Post by: Dave on 03 June 2020, 10:20:48
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
Title: Re: Issues with dhcpcd-openrc
Post by: ndowens on 03 June 2020, 20:54:34
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
Title: Re: Issues with dhcpcd-openrc
Post by: Dave on 04 June 2020, 09:18:38
Great, thanks for your help and the quick fix.