Bug 2191

Summary: /etc/rc.d/rc deals with $1 instead of $i
Product: [Retired] Red Hat Linux Reporter: Marc MERLIN <marc_soft>
Component: initscriptsAssignee: David Lawrence <dkl>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 5.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: 1999-04-15 13:54:06 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Marc MERLIN 1999-04-15 08:22:12 UTC
I also added skipping of rpmnew files. I understand that
you are not likely to ever generate those files for init
scripts, but it's doesn't cost much to check anyway

Since the patch isn't too long, I pasted it here:
--- rc.redhat   Thu Feb  4 11:11:00
1999
+++ rc  Thu Apr 15 00:11:33
1999
@@ -42,8 +42,9
@@
                [ ! -f $i ] &&
continue

                # Don't run [KS]??foo.{rpmsave,rpmorig}
scripts
-               [ "${1%.rpmsave}" != "${1}" ] &&
continue
-               [ "${1%.rpmorig}" != "${1}" ] &&
continue
+               [ "${i%.rpmsave}" != "${i}" ] &&
continue
+               [ "${i%.rpmorig}" != "${i}" ] &&
continue
+               [ "${i%.rpmnew}" != "${i}" ] &&
continue

                # Check if the subsystem is already
up.

subsys=${i#/etc/rc.d/rc$runlevel.d/K??}
@@ -64,8 +65,9
@@
                [ ! -f $i ] &&
continue

                # Don't run [KS]??foo.{rpmsave,rpmorig}
scripts
-               [ "${1%.rpmsave}" != "${1}" ] &&
continue
-               [ "${1%.rpmorig}" != "${1}" ] &&
continue
+               [ "${i%.rpmsave}" != "${i}" ] &&
continue
+               [ "${i%.rpmorig}" != "${i}" ] &&
continue
+               [ "${i%.rpmnew}" != "${i}" ] &&
continue

                # Check if the subsystem is already
up.
                subsys=${i#/etc/rc.d/rc$runlevel.d/S??}

Comment 1 Bill Nottingham 1999-04-15 13:54:59 UTC
fixed in initscripts-4.13