Bug 163598 - invalid stop() function in init.d/named script
invalid stop() function in init.d/named script
Status: CLOSED DUPLICATE of bug 154335
Product: Fedora
Classification: Fedora
Component: bind (Show other bugs)
3
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jason Vas Dias
Ben Levenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-07-19 08:11 EDT by Andy Shevchenko
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-07-20 05:13:45 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Andy Shevchenko 2005-07-19 08:11:59 EDT
Description of problem:
The stop() function in init.d/named  script has illegal construction.
Next patch fix the problem.

stop() {
        # Stop daemons.
        echo -n $"Stopping $prog: "
-       /usr/sbin/rndc stop >/dev/null 2>&1 || pidof named >/dev/null &&
killproc named -TERM >/dev/null 2>&1
+       /usr/sbin/rndc stop >/dev/null 2>&1 || (pidof named >/dev/null
&& killproc named -TERM >/dev/null 2>&1)
        RETVAL=$?
...


Due to BASH interpretes

/usr/sbin/rndc stop >/dev/null 2>&1 || pidof named >/dev/null &&
killproc named -TERM >/dev/null 2>&1

as

(/usr/sbin/rndc stop >/dev/null 2>&1 || pidof named >/dev/null) &&
killproc named -TERM >/dev/null 2>&1

instead of

/usr/sbin/rndc stop >/dev/null 2>&1 || (pidof named >/dev/null &&
killproc named -TERM >/dev/null 2>&1)

we have occur error. 

'killproc named -TERM' returns error code, because of process is down already.

Also files in /var/run/ are not removed and error present when next start is 
executed.

Version-Release number of selected component (if applicable):
Last official update of FC3.

Additional info:
I should like to make some note. Above text is translated from russian and 
posted here by me. However, original author of the analysis are "Sergei 
LITVINENKO" <slitvinenko@voliacable.com>.
Comment 1 Jason Vas Dias 2005-07-19 12:48:48 EDT
This is now fixed with bind-9.2.5-3, to be released as an FC-3 update today.
Comment 2 Andy Shevchenko 2005-07-20 05:13:45 EDT

*** This bug has been marked as a duplicate of 154335 ***

Note You need to log in before you can comment on or make changes to this bug.