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

Bug 651212

Summary: net-analyzer/smokeping-2.7.3 files/smokeping.init.5 command_args="--nodaemon" stops smokeping from logging events
Product: Gentoo Linux Reporter: nic <nic>
Component: Current packagesAssignee: Gentoo Netmon project <netmon>
Severity: normal CC: henson, mjo, nic
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 631140    

Description nic 2018-03-23 00:31:55 UTC
The new init script packaged unstable smokeping-2.7.1.ebuild incorrectly sets the default "nodaemon" command argument. SmokePing will not generate syslog messages when ran with this flag.

This appears to have been done as a workaround ? For without that value passed in the init script smokeping crashes ;/


I have successfully "sudo su -s /bin/bash smokeping" and ran the command manually.

$ perl /usr/bin/smokeping 
Note: logging to syslog as local1/info.
Daemonizing /usr/bin/smokeping ...
creating /run/ Permission denied

Confirming syslog events are being generated. (The pid creation issue could be suppressed by pathing it to the smokeping users home dir: /var/lib/smokeping -- would appreciate the insight on how to set that the correct way;)

Need to dig deeper into the init script logic for it's not clear to me yet what exit condition the nodaemon flag is masking.
Comment 1 nic 2018-03-26 16:06:57 UTC
The init script crash is related to the pid error smokeping throws; permission denied for that file is created with root:root ownership by start-stop-daemon.

I was able to get this working by removing these lines:


Update the pid paths as /run/smokeping


 piddir = /run/smokeping

Borrowing logic from the previous init script to create the run pid dir, add this to start_pre()

 if [ ! -d /run/smokeping/ ]; then
   mkdir /run/smokeping/
 chown $command_user /run/smokeping/

That enabled smokeping to properly run in it's own daemon mode with syslog functionally, and suppress the errors generated by allowing it to create the pid file with smokeping:smokeping ownership.

Thanks ;)