Skip to content

Commit

Permalink
openrc-run.sh: allow spaces in required_{files,dirs}
Browse files Browse the repository at this point in the history
X-Gentoo-Bug: 562320
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=562320
  • Loading branch information
williamh committed Oct 13, 2015
1 parent 850ca03 commit 29f7e33
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions sh/openrc-run.sh.in
Expand Up @@ -221,16 +221,16 @@ done
# Load our script
sourcex "$RC_SERVICE"

for _d in $required_dirs; do
if [ ! -d $_d ]; then
eval "printf '%s\n' $required_dirs" | while read _d; do
if [ ! -d "$_d" ]; then
eerror "$RC_SVCNAME: \`$_d' is not a directory"
exit 1
fi
done
unset _d

for _f in $required_files; do
if [ ! -r $_f ]; then
eval "printf '%s\n' $required_files" | while read _f; do
if [ ! -r "$_f" ]; then
eerror "$RC_SVCNAME: \`$_f' is not readable"
exit 1
fi
Expand Down

2 comments on commit 29f7e33

@r1k0
Copy link

@r1k0 r1k0 commented on 29f7e33 Oct 13, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

after that commit, I get for each service (boot and shutdown)

for example: restart dhcpcd

 * tor: `' is not a directory
 * tor: `' is not readable
 * Stopping Tor ...                                                                                      [ ok ]
 * privoxy: `' is not a directory
 * privoxy: `' is not readable
 * Stopping privoxy ...                                                                                  [ ok ]
 * netmount: `' is not a directory
 * netmount: `' is not readable
 * Unmounting network filesystems ...                                                                    [ ok ]
 * dhcpcd: `' is not a directory
 * dhcpcd: `' is not readable
 * Stopping DHCP Client Daemon ...                                                                       [ ok ]
 * dhcpcd: `' is not a directory
 * dhcpcd: `' is not readable
 * Starting DHCP Client Daemon ...                                                                       [ ok ]
 * privoxy: `' is not a directory
 * netmount: `' is not a directory
 * privoxy: `' is not readable
 * netmount: `' is not readable
 * Starting privoxy ...
 * Mounting network filesystems ...
 * tor: `' is not a directory
 * tor: `' is not readable                                                                               [ ok ]
 * Tor configuration (/etc/tor/torrc) is valid.
 * Starting Tor ...                                                                                      [ ok ]

what if $required_dirs and $required_files are empty with the new code?

@r1k0
Copy link

@r1k0 r1k0 commented on 29f7e33 Oct 14, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update to openrc-0.18.2

Please sign in to comment.