Red Hat Bugzilla – Bug 54494

various oversights in /etc/rc.d/init.d/functions

Last modified: 2014-03-16 22:23:44 EDT

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

A couple of these were fixed in 7.2, more will be fixed in initscripts-6.51-1.