Bug 114545 - [PATCH] /etc/init.d/nfslock minor problem regarding unset NETWORKING
[PATCH] /etc/init.d/nfslock minor problem regarding unset NETWORKING
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: nfs-utils (Show other bugs)
3.0
All Linux
medium Severity low
: ---
: ---
Assigned To: Steve Dickson
Ben Levenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-01-29 08:35 EST by Peter Bieringer
Modified: 2007-11-30 17:07 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-06-14 13:52:10 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Peter Bieringer 2004-01-29 08:35:22 EST
Description of problem:
in case of NETWORKING isn't set in /etc/sysconfig/network,
/etc/init.d/nfslock has a minor problem

Version-Release number of selected component (if applicable):
nfs-utils-1.0.5-3

How reproducible:
Always

Steps to Reproduce:
1. remove NETWORKING in /etc/sysconfig/network
2. service nfslock start

Actual Results:  # service nfslock start
/etc/init.d/nfslock: line 26: [: =: unary operator expected
Starting NFS statd:                                        [  OK  ]


Expected Results:  Proper problem catching

Additional info:

Fix:

# diff -u nfslock.orig nfslock
--- nfslock.orig        2004-01-29 14:34:25.000000000 -0500
+++ nfslock     2004-01-29 14:34:33.000000000 -0500
@@ -23,7 +23,7 @@
 . /etc/sysconfig/network

 # Check that networking is up.
-[ ${NETWORKING} = "no" ] && exit 0
+[ "${NETWORKING}" = "no" ] && exit 0

 # Start lockd from userland only if kernel <= 2.2.18
 OS_RELEASE=`uname --release`


BTW: this issue rises also up on
# grep "\${NETWORKING}" /etc/init.d/* | grep -v  "\"\${NETWORKING}\""
/etc/init.d/nfs:[ ${NETWORKING} = "no" ] && exit 0
/etc/init.d/nfslock:[ ${NETWORKING} = "no" ] && exit 0
/etc/init.d/ntpd:[ ${NETWORKING} = "no" ] && exit 0
/etc/init.d/postfix:[ ${NETWORKING} = "no" ] && exit 0
/etc/init.d/spamassassin:[ ${NETWORKING} = "no" ] && exit 0
/etc/init.d/vsftpd:[ ${NETWORKING} = "no" ] && exit 0

But it is already fixed in
# grep "\${NETWORKING}" /etc/init.d/* | grep  "\"\${NETWORKING}\""
/etc/init.d/netfs:[ "${NETWORKING}" = "no" ] && exit 0
/etc/init.d/network:[ "${NETWORKING}" = "no" ] && exit 0
/etc/init.d/xinetd:[ "${NETWORKING}" = "yes" ] || exit 0

BTW: someone should think about whether "yes" or "no" would be the
proper value to check...
Comment 2 Jay Turner 2004-09-01 22:27:43 EDT
An errata has been issued which should help the problem 
described in this bug report. This report is therefore being 
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files, 
please follow the link below. You may reopen this bug report 
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2004-263.html

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