Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 163598 - invalid stop() function in init.d/named script
Summary: invalid stop() function in init.d/named script
Keywords:
Status: CLOSED DUPLICATE of bug 154335
Alias: None
Product: Fedora
Classification: Fedora
Component: bind
Version: 3
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jason Vas Dias
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-07-19 12:11 UTC by Andy Shevchenko
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-07-20 09:13:45 UTC


Attachments (Terms of Use)

Description Andy Shevchenko 2005-07-19 12:11:59 UTC
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 16:48:48 UTC
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 09:13:45 UTC

*** 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.