Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 691342

Summary: net-proxy/dante sockd from init script should not try to create a pid file
Product: Gentoo Linux Reporter: Maciej S. Szmigiero <mail>
Component: Current packagesAssignee: Robin Johnson <robbat2>
Status: UNCONFIRMED ---    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: dante-1.4.2-sockd-init
dante-1.4.2-sockd-init
dante-1.4.2-sockd-init

Description Maciej S. Szmigiero 2019-08-03 14:33:54 UTC
net-proxy/dante sockd logs a warning when started from /etc/init.d/dante-sockd
init script:
sockd[1234]: warning: could not open pidfile /var/run/sockd.pid for writing: Permission denied

This is because by default sockd tries to create a pid file on its own
(even though the init script uses start-stop-daemon to do it on its behalf),
which fails since the sockd is running under an unprivileged user id.

Suggest to either change SOCKD_OPT="" to SOCKD_OPT="-p /dev/null" in
/etc/init.d/dante-sockd or to pass "--with-pidfile=/dev/null" to configure script
in the package ebuild so it doesn't try to write a pid file by default
unless explicitly told to.
Comment 1 Quentin Retornaz 2020-02-13 00:41:30 UTC
Created attachment 613594 [details]
dante-1.4.2-sockd-init
Comment 2 Quentin Retornaz 2020-02-13 00:41:45 UTC
I wrote a refined initd attached
Comment 3 Quentin Retornaz 2020-02-13 19:18:46 UTC
Created attachment 613714 [details]
dante-1.4.2-sockd-init

I fixed permissions for pidfile
Comment 4 Quentin Retornaz 2020-02-13 19:40:25 UTC
Created attachment 613718 [details]
dante-1.4.2-sockd-init

moved TMPDIR environment variable
Comment 5 Ameretat.Reith 2022-02-18 09:49:10 UTC
(In reply to Quentin Retornaz from comment #4)
> Created attachment 613718 [details]
> dante-1.4.2-sockd-init
> 
> moved TMPDIR environment variable

Thanks Quentin. Currently shipped init script doesn't actually start service for me and your version did the trick!