RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1756535 - " if: Expression Syntax. " error when logging in if default shell is /bin/tcsh due to incorrect syntax in tcsh login script
Summary: " if: Expression Syntax. " error when logging in if default shell is /bin/tcs...
Keywords:
Status: CLOSED DUPLICATE of bug 1738491
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: kde-settings
Version: 7.7
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: rc
: ---
Assignee: Jan Grulich
QA Contact: Desktop QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-09-27 21:18 UTC by Paul Burke
Modified: 2019-09-30 05:24 UTC (History)
0 users

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-09-30 05:24:08 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Paul Burke 2019-09-27 21:18:18 UTC
Description of problem:

When users have /bin/tcsh set as their default shell and log in to a terminal on RHEL 7.7, they receive the message "if: Expression Syntax." before their terminal prompt.  I traced this to an improperly formatted if statement in /etc/profile.d/kde.csh 

if [ ! -d ${HOME}/.local/share -a -w ${HOME} ] then
mkdir -p ${HOME}/.local/share


tcsh appears to error out on the square brackets ( [] ) in this script, as they are not syntactically correct.  A machine kickstarted on 7.2 does not present this error, but one found kickstarted on 7.7 and possibly some other releases between 7.2 and 7.7 appear to have this problem.  I found that the file is provided by the kde-settings package

Version-Release number of selected component (if applicable):
7.7, possibly sooner

How reproducible:
Every attempt, if the improperly formatted /etc/profile.d/kde.csh is present

Steps to Reproduce:
1. set user's default shell to /bin/tcsh
2. log in via SSH or open the terminal
3. alternatively, use "tcsh -l" to start a tcsh login session

Actual results:
Prompt shows the following upon login/running the "tcsh -l" command

if: Expression Syntax.
[user@hostname ~]$ 

Expected results:
User is simply presented with a prompt

[user@hostname ~]$ 

Additional info:
The machine kickstarted on 7.2 has since been updated through all point releases to 7.7 and all releases of kde-settings, but does not have the misconfigured .csh script

Comment 2 Jan Grulich 2019-09-30 05:24:08 UTC

*** This bug has been marked as a duplicate of bug 1738491 ***


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