Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 389975 - net-analyzer/netperf-2.5.0: init script does not start netserver
Summary: net-analyzer/netperf-2.5.0: init script does not start netserver
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal major (vote)
Assignee: Gentoo Netmon project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: s-s-d-deprecated
  Show dependency tree
 
Reported: 2011-11-09 15:41 UTC by Nathan Shearer
Modified: 2016-08-09 08:41 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
use separate directory for logs (netperf-2.5.0.ebuild.patch,754 bytes, patch)
2011-11-17 15:09 UTC, Michael Palimaka (kensington)
Details | Diff
init script patch (netperf-init.patch,291 bytes, patch)
2011-11-17 15:14 UTC, Michael Palimaka (kensington)
Details | Diff
A quick patch to omit the --user option/arg (netperf-init.patch,384 bytes, text/plain)
2012-12-11 23:21 UTC, Roger
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nathan Shearer 2011-11-09 15:41:12 UTC
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
Comment 1 Nathan Shearer 2011-11-09 16:26:39 UTC
It looks like the newinitd helper creates broken init scripts. Isn't this a problem with portage and not netperf?
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2011-11-12 15:57:58 UTC
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.
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2011-11-12 16:33:39 UTC
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!
Comment 4 Michael Palimaka (kensington) gentoo-dev 2011-11-17 15:09:17 UTC
Created attachment 292901 [details, diff]
use separate directory for logs

Patch to use separate directory and user for logging.
Comment 5 Michael Palimaka (kensington) gentoo-dev 2011-11-17 15:14:40 UTC
Created attachment 292905 [details, diff]
init script patch

simple patch for initscript
Comment 6 Christian Ruppert (idl0r) gentoo-dev 2011-12-31 20:15:22 UTC
Fixed in CVS.

For the logging issue file a separate bug please.
Comment 7 Jeroen Roovers (RETIRED) gentoo-dev 2012-06-13 16:27:42 UTC
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.
Comment 8 Roger 2012-12-11 23:18:42 UTC
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.
Comment 9 Roger 2012-12-11 23:21:02 UTC
Created attachment 332086 [details]
A quick patch to omit the --user option/arg
Comment 10 Roger 2012-12-11 23:39:08 UTC
My patch is against, netperf-2.5.0-r1.

I'm seeing several recent masked versions.
Comment 11 Bruce Schultz 2014-01-05 09:35:04 UTC
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.
Comment 12 Jeroen Roovers (RETIRED) gentoo-dev 2016-08-09 08:41:21 UTC
Fixed in 2.7.0-r1.