Bug 479398 - Parse error in cdargs.sh in case the login shell is not bash
Summary: Parse error in cdargs.sh in case the login shell is not bash
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: cdargs   
(Show other bugs)
Version: 10
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Milos Jakubicek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-01-09 10:45 UTC by Michael Schmitz
Modified: 2009-02-05 02:13 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-02-05 02:11:46 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

Description Michael Schmitz 2009-01-09 10:45:16 UTC
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 21:05:47 UTC
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 21:44:30 UTC
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 21:45:22 UTC
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-15 02:58:22 UTC
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-15 02:58:57 UTC
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-05 02:11:43 UTC
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-05 02:13:55 UTC
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.