emerge =net-analyzer/netperf-2.5.0 and you will find that /etc/init.d/netperf does not start the netserver. It is because there are 2 deprecated arguments being passed to start-stop-daemon: --quiet and --chuid. After removing --quiet and --chuid the init script begins to work as expected. I am using start-stop-daemon (OpenRC) 0.8.3 (Gentoo Linux) from sys-apps/openrc-0.8.3-r1
It looks like the newinitd helper creates broken init scripts. Isn't this a problem with portage and not netperf?
newinitd simply installs an existing file under a new name - it's the existing file ($PORTDIR/net-analyzer/netperf/files/netperf-2.2-init) that needs to be fixed.
Puzzling is that bug #170569 appears to have fixed a security bug by logging to /var/log as user nobody, who normally wouldn't have permission to create files there!
Created attachment 292901 [details, diff] use separate directory for logs Patch to use separate directory and user for logging.
Created attachment 292905 [details, diff] init script patch simple patch for initscript
Fixed in CVS. For the logging issue file a separate bug please.
This isn't fixed. After removing the --quiet option and the redirect to /dev/null from the init.d script, it becomes obvious why netserver does not start: wieneke ~ # /etc/init.d/netperf restart * Caching service dependencies ... [ ok ] * Stopping netperf server (netserver) ... [ ok ] * Starting netperf server (netserver) ... Starting netserver with host 'IN(6)ADDR_ANY' port '12865' and family AF_UNSPEC netserver: debug file: Permission denied [ ok ] When we set --user nobody, we should also make sure that the user can write files.
Sorry, th attached init script patch does not work. (Attachment #292905 [details, diff]) The error, "User 'netperf' not found." The hack that does work, is simply edit the init script and remove "--user user_id". There's also no "network" group within /etc/group here, so not sure as to what the intentions of specifying user|group here. First off, if security is for some reason desired for such a simple program, I'd recommend using group instead of user... correct? Personally, I'd just dump the "--user" field as it's a sure fix, unless somebody wants to post a "real fix", so this bug can be closed.
Created attachment 332086 [details] A quick patch to omit the --user option/arg
My patch is against, netperf-2.5.0-r1. I'm seeing several recent masked versions.
The netserver option -N surpresses the debug output, so it doesn't try to open the file. /etc/conf.d/netperf: NETSERVER_ARGS="-N" Seems to be a simpler fix than patching the init script.
Fixed in 2.7.0-r1.