Bug 23757

Summary: inet sysvinit script doesn't handle missing /etc/sysconfig/network
Product: [Retired] Red Hat Linux Reporter: wstearns
Component: inetdAssignee: Trond Eivind Glomsrxd <teg>
Status: CLOSED RAWHIDE QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: 6.2   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-01-19 21:17:18 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description wstearns 2001-01-11 00:26:33 UTC
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 22:36:42 UTC
Fixed in portmap-4.0-31 (the first one should never occur as this file is always
created by the installer, but it doesn't hurt to make even more sure)

Comment 2 Trond Eivind Glomsrxd 2001-01-20 22:45:21 UTC
Oops... wrong bung. Anyway, this has been added to xinetd (the inetd replacement)