Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 439236 - sys-apps/openrc: deprecate the -q/--quiet option for start-stop-daemon
Summary: sys-apps/openrc: deprecate the -q/--quiet option for start-stop-daemon
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: OpenRC (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: OpenRC Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-22 08:08 UTC by William Hubbs
Modified: 2012-11-01 23:01 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description William Hubbs gentoo-dev 2012-10-22 08:08:59 UTC
Team,

flameeyes has asked that we deprecate then eventually remove this
option. He feels that too many init scripts are using it for no reason
and it is making it very difficult to troubleshoot when daemons do not
start successfully.

My first step will be to remove the functionality  but print a
deprecation warning when someone uses the option, then at a later time
we can go back with another bug and remove the option itself.
Comment 1 Christian Ruppert (idl0r) gentoo-dev 2012-10-22 16:36:19 UTC
+1

I totally agree.
Comment 2 SpanKY gentoo-dev 2012-10-23 16:40:37 UTC
misuse in init.d scripts isn't a valid reason to drop an option from s-s-d.  this would break compatibility with other systems shipping s-s-d, and break end users who want --quiet.

plus, there are valid uses for this flag.  there are daemons which crap all over stdout when starting up and that's just normal for them.  the -q flag silences that.
Comment 3 Diego Elio Pettenò (RETIRED) gentoo-dev 2012-10-23 16:44:47 UTC
What about reprecating it, but replacing it with a --silent option?

The daemons crapping during normal start are a much lower proportion to those that actually print out during errors and are being shut up by --quiet right now.
Comment 4 William Hubbs gentoo-dev 2012-10-23 17:41:09 UTC
(In reply to comment #3)
> What about reprecating it, but replacing it with a --silent option?
> 
> The daemons crapping during normal start are a much lower proportion to
> those that actually print out during errors and are being shut up by --quiet
> right now.

This might work. What I think I could do is change -q/--quiet to just print a message that you should use --silent if this is what you really want.

But, Mike does make a good point. Shouldn't we be filing bugs against all of our init scripts that use this flag and requesting that they drop it, or better yet, that they use OpenRC's default stop/start functions unless they have a good reason not to?
Comment 5 SpanKY gentoo-dev 2012-10-23 17:51:49 UTC
changing --quiet to --silent wouldn't address the compatibility issues (both with other distros and with user scripts)

i'd rather file/fix bad init.d scripts.  converting to default start/stop funcs would be even better.
Comment 6 Diego Elio Pettenò (RETIRED) gentoo-dev 2012-10-23 17:56:01 UTC
Some of the converted scripts also use --quiet in their ssd options though :(
Comment 7 William Hubbs gentoo-dev 2012-10-23 18:25:47 UTC
(In reply to comment #6)
> Some of the converted scripts also use --quiet in their ssd options though :(

Maybe we should file bugs and ask maintainers to refrain from doing this?

I can see both sides of this. If a daemon is particularly verbose during startup, a maintainer may want to use it. However, they should be made aware that it can hide error messages a sysadmin may want to see.
Comment 8 William Hubbs gentoo-dev 2012-10-23 18:43:42 UTC
I just had another thought.

Sometimes, daemons themselves have quiet options that will skip all of
the things they spit out on stdout but display error messages. IMO if
that is the case, the maintainer should use the daemon's option instead
of our --quiet option.
Comment 9 Christian Ruppert (idl0r) gentoo-dev 2012-10-24 17:46:46 UTC
See commit 9afdf50667661812be936fe6d3b3a939b0c54061, stderr is no longer redirected through --quiet/-q.
Anyway.. All affected init scripts need to be fixed.
All the init scripts that I fixed in the past few years had -q/--quiet for *no* reason.
Comment 10 SpanKY gentoo-dev 2012-10-24 18:37:57 UTC
(In reply to comment #9)

i think not swallowing stderr is probably OK for the majority of daemons

i know --quiet is used with some to silence their spew because i've added it specifically for that purpose ;)
Comment 11 William Hubbs gentoo-dev 2012-11-01 23:01:41 UTC
All,

since we agreed that fixing the init scripts is the better way to go for
this, I am closing this bug as worksforme.

If someone disagrees, please feel free to reopen.