Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 489358 - sys-apps/openrc - Honor per service set verbose mode
Summary: sys-apps/openrc - Honor per service set verbose mode
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: OpenRC (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: OpenRC Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 481182
  Show dependency tree
 
Reported: 2013-10-25 11:55 UTC by Thomas Deutschmann (RETIRED)
Modified: 2013-10-31 21:17 UTC (History)
0 users

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


Attachments
Honor per service configured verbose mode (honor-per-service-configured-verbose-mode.patch,480 bytes, patch)
2013-10-25 11:55 UTC, Thomas Deutschmann (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Deutschmann (RETIRED) gentoo-dev 2013-10-25 11:55:29 UTC
Created attachment 361886 [details, diff]
Honor per service configured verbose mode

Hi,

like discussed on Thursday, 24th October 2013 in #openrc:

1) You have a service "foo"

2) You want to enable verbose mode for the runscript, but only for service "foo".

3) Like any other rc* option you want to set per service, you would do something like

  # echo 'rc_verbose="YES"' >> /etc/conf.d/foo

If you check for "rc_verbose" in the initscript, it is set to YES like expected, but if your initscript uses any e*-function prefixed with v you won't get your expected output, because the environment variable "EINFO_VERBOSE" is set to "NO":

man runscript:

  > You can prefix the above commands with the letter v,
  > which means they only output when the environment variable
  > EINFO_VERBOSE is true.

"EINFO_VERBOSE" isn't set to "TRUE", because it will be set by "/sbin/runscript" which only sources "/etc/rc.conf" and no service specific configuration like "/etc/conf.d/<service>{,.<runlevel>}".

We fix this using "/lib/rc/sh/runscript.sh", which sources the per service configuration and therefore knows if rc_verbose is set to "YES" and can update "EINFO_VERBOSE".
Comment 1 William Hubbs gentoo-dev 2013-10-31 21:17:38 UTC
This is fixed in commit 6965d85 and will be included in OpenRC-0.13.