Bug 7913 - /etc/profile.d/kde.csh has incorrect syntax
/etc/profile.d/kde.csh has incorrect syntax
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: kdesupport (Show other bugs)
6.1
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bernhard Rosenkraenzer
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 1999-12-20 16:05 EST by Philip Spencer
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: 2000-01-07 06:28:31 EST
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 Philip Spencer 1999-12-20 16:05:19 EST
/etc/profile.d/kde.csh has the following incorrect line:

if ( `echo ${PATH} | grep -q ${kdepath}` ) then

Since grep -q never generates output, the value interpolated by the
backticks will always be the empty string. Presumably braces were intended,
but these don't work properly for pipelines, so the best solution is
probably to apply the following patch:

--- kdesupport-1.1.2/scripts/kde.csh.orig       Mon Jul 12 13:38:02 1999
+++ kdesupport-1.1.2/scripts/kde.csh    Thu Dec  9 12:11:08 1999
@@ -6,7 +6,8 @@
 endif
 setenv KDEDIR @KDEPREFIX@
 set kdepath="${KDEDIR}/bin"
-if ( `echo ${PATH} | grep -q ${kdepath}` ) then
+echo ${PATH} | grep -q ${kdepath}
+if ( $status == 0 ) then
   exit
 endif
Comment 1 Bernhard Rosenkraenzer 2000-01-07 06:28:59 EST
Thanks, fixed.

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