Bug 7913

Summary: /etc/profile.d/kde.csh has incorrect syntax
Product: [Retired] Red Hat Linux Reporter: Philip Spencer <pspencer>
Component: kdesupportAssignee: Bernhard Rosenkraenzer <bero>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6.1   
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: 2000-01-07 11:28:31 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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.