Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 471600

Summary: local_stop not executed
Product: Gentoo Hosted Projects Reporter: Norman Shulman <norman.shulman>
Component: OpenRCAssignee: OpenRC Team <openrc>
Status: RESOLVED INVALID    
Severity: normal Keywords: PATCH
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Norman Shulman 2013-05-28 15:27:33 UTC
nshulman@nvshp:~
$ cat /etc/gentoo-release 
Gentoo Base System release 2.2

nshulman@nvshp:~
$ equery -q b /etc/init.d/local
sys-apps/openrc-0.11.8

In stop(),

        if type local_start >/dev/null 2>&1; then

should be

        if type local_stop >/dev/null 2>&1; then
Comment 1 William Hubbs gentoo-dev 2013-05-28 15:57:16 UTC
local_stop is not meant to be executed. Please see /etc/local.d/README
for instructions on how to set up things you want the local service to
start or stop.
Comment 2 Norman Shulman 2013-05-28 16:21:41 UTC
Seems that as a migration aid, the intent is if local_stop exists, print a warning and execute it (as is done for local_start). Otherwise the if-statement is useless.

As it is (apparently because of a typo), if local_start exists, stop() will attempt to execute local_stop (which might not even exist).
Comment 3 William Hubbs gentoo-dev 2013-05-28 22:21:54 UTC
(In reply to Norman Shulman from comment #2)
> Seems that as a migration aid, the intent is if local_stop exists, print a
> warning and execute it (as is done for local_start). Otherwise the
> if-statement is useless.
> 
> As it is (apparently because of a typo), if local_start exists, stop() will
> attempt to execute local_stop (which might not even exist).

It is true that there is a typo in stop(), but if you have followed the instructions from the message in start(), local_stop will not exist because you have migrated everything to scripts in /etc/local.d and removed /etc/conf.d/local which is where local_stop was defined.

So I'm just wondering if we should still fix it.
Comment 4 Norman Shulman 2013-05-31 16:03:01 UTC
(In reply to William Hubbs from comment #3)
> (In reply to Norman Shulman from comment #2)
> > Seems that as a migration aid, the intent is if local_stop exists, print a
> > warning and execute it (as is done for local_start). Otherwise the
> > if-statement is useless.
> > 
> > As it is (apparently because of a typo), if local_start exists, stop() will
> > attempt to execute local_stop (which might not even exist).
> 
> It is true that there is a typo in stop(), but if you have followed the
> instructions from the message in start(), local_stop will not exist because
> you have migrated everything to scripts in /etc/local.d and removed
> /etc/conf.d/local which is where local_stop was defined.

Right, but until people migrate, this ensures that their systems don't break.

> So I'm just wondering if we should still fix it.

I would say yes; it's a simple one-line (one-word) fix which avoids breakage while encouraging migration.