Bug 7913 - /etc/profile.d/kde.csh has incorrect syntax
Summary: /etc/profile.d/kde.csh has incorrect syntax
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: kdesupport
Version: 6.1
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bernhard Rosenkraenzer
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 1999-12-20 21:05 UTC by Philip Spencer
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2000-01-07 11:28:31 UTC
Embargoed:


Attachments (Terms of Use)

Description Philip Spencer 1999-12-20 21:05:19 UTC
/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 11:28:59 UTC
Thanks, fixed.


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