When starting radiusd for the first time either after a reboot or once started manually, it will not restart citing errors relating to a service already running on port 1812. Reproducible: Always Steps to Reproduce: 1. Start system 2. Run '/etc/init.d/radiusd stop' 3. Try running '/etc/init.d/radiusd stop' or 'radiusd -X' to see errors 4. Run 'ps -eaf | grep radius' to see that the process is still running 5. Run 'kill ' and then the process id from step 4 6. Run '/etc/init.d/radiusd start' or 'radiusd -X' and it should be fine again, but will not work after being stopped. 7. Check '/var/lib/run' for the existance of 'radiusd' directory as well as the pid files. Turns out that following an upgrade from 2.2.0 to 2.2.5 that the location for 'localstatedir' in radiusd.conf has been changed to '/var/lib' meaning that the init scripts were not killing the process since it was in '/var/lib/run/radiusd'. After modifying this line to read 'localstatedir = /var' everything happens as it should on a restart, running 'radiusd -X' and using the init scripts to control the service.
2.2.0 used /var/lib/run/radiusd and 2.2.5 fixed that so /run/ is used instead. I would have thought configuration file protection would have warned you that radiusd.conf had changed.
(In reply to Jeroen Roovers from comment #1) > 2.2.0 used /var/lib/run/radiusd and 2.2.5 fixed that so /run/ is used > instead. I would have thought configuration file protection would have > warned you that radiusd.conf had changed. It may well have done and I'm willing to admit that I may have missed this at the beginning of the differences shown, although I did pick up on some other minor changes that I had to make. I thought I'd report it since I wasn't sure if the intention was for the config to point at '/var/lib' anyway, as the init scripts were not working as they should for shutting down.
(In reply to Mark from comment #2) > (In reply to Jeroen Roovers from comment #1) > > 2.2.0 used /var/lib/run/radiusd and 2.2.5 fixed that so /run/ is used > > instead. I would have thought configuration file protection would have > > warned you that radiusd.conf had changed. > > It may well have done and I'm willing to admit that I may have missed this > at the beginning of the differences shown, although I did pick up on some > other minor changes that I had to make. I thought I'd report it since I > wasn't sure if the intention was for the config to point at '/var/lib' > anyway, as the init scripts were not working as they should for shutting > down. Also, when I ran etc-update, I replaced radiusd.conf with the new one and then modified the 2 lines that I needed to, rather than making the changes to the old file.
I have reviewed all the init script changes and I didn't find any problems there that could be fixed in the scripts themselves. The PID files are now written to the location OpenRC expects them, and the change was both likely to cause this (temporary) breakage and necessary. There isn't much we can do about run time variables like PID file locations that normally rarely change. OpenRC could probably be taught to use the old init.d script to stop a service and then use the new init.d script to (re)start it.
OK, thanks for investigating.