Bug 3718

Summary: /etc/profile.d/kde.csh has syntax errors under tcsh
Product: [Retired] Red Hat Linux Reporter: khera
Component: kdesupportAssignee: David Lawrence <dkl>
Status: CLOSED DUPLICATE QA Contact:
Severity: high Docs Contact:
Priority: medium    
Version: 6.0CC: raul
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 1999-06-25 10:32:41 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description khera 1999-06-24 22:17:29 UTC
I upgraded to the kde 1.1.1 release posted to
updates.redhat.com, and the next time I logged in, there was
a syntax error reported prior to my .login or .cshrc being
run.  I tracked this down to syntax errors (at least under
tcsh) in /etc/profile.d/kde.csh.  According to the csh
manual, these fixes should be there as well (ie, you can't
use a pipeline inside an if() statement).

--- kde.csh.orig        Mon Jun 21 14:28:21 1999
+++ kde.csh     Thu Jun 24 18:11:08 1999
@@ -5,8 +5,9 @@
          endif
 endif
 setenv KDEDIR /usr
-kdepath="${KDEDIR}/bin"
-if ( echo ${PATH} | grep -q ${kdepath} ) then
+set kdepath="${KDEDIR}/bin"
+echo "${PATH}" | grep -q ${kdepath}
+if ( ! $status ) then
   exit
 endif

Comment 1 Jeff Johnson 1999-06-25 10:28:59 UTC
*** Bug 3709 has been marked as a duplicate of this bug. ***

The following bug(s) cause an error every time a user tries
to login or execute a shell, if their default shell is
csh/tcsh.  It also halts processing of the user's own
customization files.

The 8th line in /etc/profile.d/kde.csh says:

  kdepath="${KDEDIR}/bin"

Because this is for csh, not sh, it should read:

  set kdepath="${KDEDIR}/bin"

Also, lines 10 through 12 that read:

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

should read

  echo $PATH | grep -q $kdepath && exit

Comment 2 Jeff Johnson 1999-06-25 10:32:59 UTC
*** This bug has been marked as a duplicate of 3686 ***