Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 545012 - openrc-0.13.11: scripts in /etc/local.d are called with arguments
Summary: openrc-0.13.11: scripts in /etc/local.d are called with arguments
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: openrc-0.14
  Show dependency tree
 
Reported: 2015-03-29 23:59 UTC by Dirk Sondermann
Modified: 2015-04-08 14:46 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 Dirk Sondermann 2015-03-29 23:59:39 UTC
As long as rc_verbose is not set to yes in rc.conf, /etc/init.d/local
calls the scripts in /etc/local.d with the three arguments ">",
"/dev/null" and "2>&1".

This is a consequence of an attempt to fix bug 537444. The lines in
start() and stop() that execute the scripts now read
  "${file}" $redirect
where $redirect is either empty (for rc_verbose=yes) or contains
"> /dev/null 2>&1" (for rc_verbose=no). But, of course, in the latter
case $redirect is not treated as a redirection but its words are
passed as arguments to ${file}.

TEST
Set rc_verbose=no in rc.conf und put the script
  #!/bin/bash
  echo args = $*
in /etc/init.d/local.

RESULT
The content of $redirect is displayed:
  * Starting local ...
  args = > /dev/null 2>&1
Comment 1 William Hubbs gentoo-dev 2015-04-03 02:45:25 UTC
The fix is in this pull request:

https://github.com/OpenRC/openrc/pull/50