Bug 23756 - portmap sysvinit script doesn't handle missing /etc/sysconfig/network
portmap sysvinit script doesn't handle missing /etc/sysconfig/network
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: portmap (Show other bugs)
6.2
All Linux
low Severity low
: ---
: ---
Assigned To: Trond Eivind Glomsrxd
Aaron Brown
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-01-10 19:22 EST by wstearns
Modified: 2005-10-31 17:00 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-01-10 19:22:47 EST
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 wstearns 2001-01-10 19:22:44 EST
If /etc/sysconfig/network is missing, the sysvinit script whines about "no
such file or directory" when network is sourced.
	Also, the test for "if [ ${NETWORKING} = "no" ] fails out because
NETWORKING has no value; the error is: "/etc/rc.d/init.d/portmap: [: =:
unary operator expected.

	Possible solution: replace:

. /etc/sysconfig/network

	with

if [ -f /etc/sysconfig/network ]
then
	. /etc/sysconfig/network
else
	exit 1
fi

	Also, replace:

if [ ${NETWORKING} = "no" ]

	with

if [ "${NETWORKING}" = "no" ]

	Cheers.
Comment 1 Trond Eivind Glomsrxd 2001-01-20 17:45:49 EST
Fixed in portmap-4.0-31

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