Bug 479398 - Parse error in cdargs.sh in case the login shell is not bash
Parse error in cdargs.sh in case the login shell is not bash
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: cdargs (Show other bugs)
10
All Linux
low Severity medium
: ---
: ---
Assigned To: Milos Jakubicek
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-01-09 05:45 EST by Michael Schmitz
Modified: 2009-02-04 21:13 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-02-04 21:11:46 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 Michael Schmitz 2009-01-09 05:45:16 EST
Description of problem:
In case a user with login shell /bin/zsh logs is, the following error occurs:

  /etc/profile.d/cdargs.sh:167: parse error near `&&'

Version-Release number of selected component (if applicable):
  cdargs-1.35-2.fc9.x86_64

How reproducible:
always

Steps to Reproduce:
1. create a user TEST with login shell /bin/sh
2. login a user TEST
  
Actual results:
/etc/profile.d/cdargs.sh is evaluated and an error message

  /etc/profile.d/cdargs.sh:167: parse error near `&&'

is written to the terminal.

Expected results:
Either /etc/profile.d/cdargs.sh is compatible with /bin/zsh and evaluated completely during the login process, or /etc/profile.d/cdargs.sh contains a block like 

  if [ -z "${BASH_VERSION}" ]
  then
    return
  fi

to suppress evaluation.

Additional info:
Comment 1 Milos Jakubicek 2009-01-11 16:05:47 EST
Confirmed and accepted your proposed solution (return silently). The error on line 167 is trivial to fix, what is not so trivial is the completion => hence the check will be only preventing the completion code from being executed, otherwise cdargs should be working fine. If you'd write a completion extension for zsh, I'll include it of course:)
Comment 2 Fedora Update System 2009-01-11 16:44:30 EST
cdargs-1.35-3.fc10 has been submitted as an update for Fedora 10.
http://admin.fedoraproject.org/updates/cdargs-1.35-3.fc10
Comment 3 Fedora Update System 2009-01-11 16:45:22 EST
cdargs-1.35-3.fc9 has been submitted as an update for Fedora 9.
http://admin.fedoraproject.org/updates/cdargs-1.35-3.fc9
Comment 4 Fedora Update System 2009-01-14 21:58:22 EST
cdargs-1.35-3.fc9 has been pushed to the Fedora 9 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing-newkey update cdargs'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F9/FEDORA-2009-0434
Comment 5 Fedora Update System 2009-01-14 21:58:57 EST
cdargs-1.35-3.fc10 has been pushed to the Fedora 10 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update cdargs'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F10/FEDORA-2009-0440
Comment 6 Fedora Update System 2009-02-04 21:11:43 EST
cdargs-1.35-3.fc10 has been pushed to the Fedora 10 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 7 Fedora Update System 2009-02-04 21:13:55 EST
cdargs-1.35-3.fc9 has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.

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