Bug 54494

Summary: various oversights in /etc/rc.d/init.d/functions
Product: [Retired] Red Hat Linux Reporter: aSmig <asmig-rh>
Component: initscriptsAssignee: Bill Nottingham <notting>
Status: CLOSED RAWHIDE QA Contact: Brock Organ <borgan>
Severity: low Docs Contact:
Priority: medium    
Version: 7.1CC: rvokal
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: 2002-01-25 04:41:46 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 aSmig 2001-10-10 07:07:48 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.3) Gecko/20010802

Description of problem:
Well, I spent about 20 minutes looking around for a public CVS that I could
submit these to but apparently my search skills need some tuning.  Anyhow,
I'm sure this isn't the proper method for submitting this sort of info but
I do want it to be useful to others rather than rotting on my drive.  There
are also a large number of unary operator errors generated by unquoted
variables in various init scripts.  Try booting a system with NETWORKING
undefined in /etc/sysconfig/network.

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


How reproducible:
Always

Steps to Reproduce:
1.sed -ne '218,219p' /etc/rc.d/init.d/functions
	

Actual Results:                  read pid < /var/run/${base}.pid
                for p in $line ; do


Expected Results:                  read line < /var/run/${base}.pid
                for p in $line ; do

Additional info:

# diff /etc/rc.d/init.d/functions /usr/local/src/initscripts/functions
95c95,96
<                  base=${1#--user=}
---
>                  base=${1#--check=}
>                  gotbase="yes"
116c117
<         [ -z $gotbase ] && base=${1##*/}
---
>         [ -z "$gotbase" ] && base=${1##*/}
136c137
<       [ $? = 0 ] && success $"$base startup" || failure $"$base startup"
---
>       [ "$?" -eq 0 ] && success $"$base startup" || failure $"$base startup"
143c144
<       if [ $# = 0 ]; then
---
>       if [ "$#" -eq 0 ]; then
168,169c169,170
<                 [ $BOOTUP = "verbose" ] && echo -n "$base "
<               if [ "$notset" = "1" ] ; then
---
>                 [ "$BOOTUP" = "verbose" ] && echo -n "$base "
>               if [ "$notset" -eq "1" ] ; then
183c184
<                       [ $RC -eq 0 ] && failure $"$base shutdown" ||
success $"$base shutdown"
---
>                       [ "$RC" -eq 0 ] && failure $"$base shutdown" ||
success $"$base shutdown"
190c191
<                               [ $RC -eq 0 ] && success $"$base
$killlevel" || failure $"$base $killlevel"
---
>                               [ "$RC" -eq 0 ] && success $"$base
$killlevel" || failure $"$base $killlevel"
211c212
<       if [ $# = 0 ] ; then
---
>       if [ "$#" = 0 ] ; then
218c219
<               read pid < /var/run/${base}.pid
---
>               read line < /var/run/${base}.pid
234c235
<       if [ $# = 0 ] ; then
---
>       if [ "$#" = 0 ] ; then
262c263
<       if [ $# = 0 ] ; then
---
>       if [ "$#" = 0 ] ; then

Comment 1 Bill Nottingham 2002-01-25 04:46:21 UTC
A couple of these were fixed in 7.2, more will be fixed in initscripts-6.51-1.