Bug 2191 - /etc/rc.d/rc deals with $1 instead of $i
/etc/rc.d/rc deals with $1 instead of $i
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: initscripts (Show other bugs)
5.2
All Linux
medium Severity medium
: ---
: ---
Assigned To: David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 1999-04-15 04:22 EDT by Marc MERLIN
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 1999-04-15 09:54:06 EDT
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 Marc MERLIN 1999-04-15 04:22:12 EDT
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 09:54:59 EDT
fixed in initscripts-4.13

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