Bug 143821 - Silly bug in /etc/init.d/ypserv prevents daemon from starting
Summary: Silly bug in /etc/init.d/ypserv prevents daemon from starting
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: ypserv   
(Show other bugs)
Version: 3.0
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Chris Feist
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2004-12-29 00:58 UTC by Ion Badulescu
Modified: 2007-11-30 22:07 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-01-03 18:03:07 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Ion Badulescu 2004-12-29 00:58:56 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5)
Gecko/20041211 Firefox/1.0

Description of problem:
This is the beginning of the start() function in the ypserv startup

        if [ "$DOMAINNAME" = "(none)" -o "$DOMAINNAME" = "" ]; then
            if [ -n "$NISDOMAIN" ]; then
                action $"Setting NIS domain name $NISDOMAIN: "
domainname $NISDOMAIN
                exit 1
        if [ ! -d /var/yp/$DOMAINNAME ]; then
                exit 1

If the domainname is not initialized, then it is set to the value of
the NISDOMAIN variable. However, the DOMAINNAME shell variable is
never re-initialized, so the test -d /var/yp/$DOMAINNAME fails.

The fix is obvious, I won't insult you guys by listing it here. :-)

As a workaround, it works on a second run (duh). That's probably what
all the SA's using ypserv on RHEL3 are currently doing...

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Set up ypserv on a server, enable it in runlevel 3
2. Reboot
3. Observe how it is not running after the server comes up

Additional info:

I'm listing it as severity: high, because a server that refuses to
start when it's supposed to is a rather critical problem. Loss of data
*can* occur if all ypservers are down and no authentication mechanism
is available.

Comment 2 Chris Feist 2005-01-03 16:53:17 UTC
I don't see these lines in the ypserv-2.8-11 rpm.

        if [ ! -d /var/yp/$DOMAINNAME ]; then
                exit 1

Can you run 'rpm -qf /etc/init.d/ypserv' to verify that the ypserv
package owns that file.  (To make sure some other rpm hasn't
overwritten it).

Is it also possible that someone added those lines into the init script?

Can you also give me the output of 'rpm --verify ypserv'?

Comment 3 Ion Badulescu 2005-01-03 18:03:07 UTC
Ugh, I must have been on some serious crack when I looked into this.

You're right, the "! -d /var/yp/$DOMAINNAME" change is a local change
to the script, which was originally made (correctly) to rh9 and then
migrated (incorrectly) to rhel3.

Sorry for wasting your time, I'm closing this report with NOTABUG
(though PEBCAK--Problem Exists Between Chair And Keyboard--would be
more appropriate...

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