/etc/profile.d/*.sh init scripts are sourced for all Bourne compatible shells including bash, zsh, and ksh. However, /etc/profile.d/keychain.sh contains a line that causes ksh-20070111-1 from Fedora 7 to puke at line 19 when a user is logging in: /etc/profile[49]: .: syntax error: `=' unexpected I think keychain.sh should be fixed to be also ksh compatible.
This issue seems to present also with Fedora 8.
This issue seems to present also with Fedora 10 Beta.
This bug has been triaged
This bug appears to have been reported against 'rawhide' during the Fedora 10 development cycle. Changing version to '10'. More information and reason for this action is here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Created attachment 327665 [details] proposed patch The problem is that the parameter expansions ${=KCHOPTS} ${=SSHKEYS} ${=GPGKEYS} are only executed by zsh but parsed by all shells. I'm using the eval command to make the expansions to be parsed only when they are executed.
Thanks for the patch, I'm happy to confirm that it fixes the issue.
*** Bug 485725 has been marked as a duplicate of this bug. ***
Created attachment 332154 [details] Drop zsh special case Hmm... with zsh >= 4.3.4-7 sourcing profile.d snippets in ksh emulation mode, is the zsh special case in /etc/profile.d/keychain.sh needed any more at all? Wouldn't this patch work for both ksh and zsh?
There has been discussion that zsh should emulate sh instead of ksh: https://bugzilla.redhat.com/show_bug.cgi?id=430665 https://bugzilla.redhat.com/show_bug.cgi?id=460741 IMVHO it would be safer to keep keychain.sh as-is: the code may look a bit cleaner and be slightly more optimal but given the potential risk of keychain.sh breaking as a side effect of other changes it seems best to leave this intact. Thanks.
The change proposed in comment 8 was already applied in keychain 2.6.8-6 (F-11+ at the moment) some 6 weeks ago. If actual problems arise out of it, please open a new keychain/zsh specific bug for it (this one's against keychain.sh not working with ksh).
Ah, ok, I was probably asleep when I made my previous commment, the current keychain.sh from Rawhide looks perfect to me. Thanks!