Bug 498482 - /etc/profile.d/lang.sh - space in logon name
/etc/profile.d/lang.sh - space in logon name
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: initscripts (Show other bugs)
10
All Linux
low Severity low
: ---
: ---
Assigned To: Bill Nottingham
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-04-30 13:11 EDT by Krenek Milan
Modified: 2014-03-16 23:18 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-04-30 13:26:39 EDT
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 Krenek Milan 2009-04-30 13:11:32 EDT
Description of problem:
Error message after login
bash: [: /home/TEST/krenek: binary operator expected


[krenek milan@my-pc-linux ~]$ bash -x /etc/profile.d/lang.sh
+ sourced=0
+ '[' -n cs_CZ.UTF-8 ']'
+ saved_lang=cs_CZ.UTF-8
+ '[' -f /home/TEST/krenek milan/.i18n ']'
/etc/profile.d/lang.sh: line 7: [: /home/TEST/krenek: binary operator expected
+ LANG=cs_CZ.UTF-8
+ unset saved_lang
+ '[' 0 = 1 ']'
+ unset sourced
+ unset langfile

Version-Release number of selected component (if applicable):
initscripts-8.86.3-1.i386

Steps to Reproduce:
1. create user login with white space
2. login under user in console
3.
  
Additional info:
FIX $HOME with quotation mark:

if [ -n "$LANG" ]; then
    saved_lang="$LANG"
    [ -f "$HOME"/.i18n ] && . "$HOME"/.i18n && sourced=1
    LANG="$saved_lang"
    unset saved_lang
else
    for langfile in /etc/sysconfig/i18n "$HOME"/.i18n ; do
        [ -f $langfile ] && . $langfile && sourced=1
    done
fi
Comment 1 Bill Nottingham 2009-04-30 13:26:39 EDT
http://git.fedorahosted.org/git/?p=initscripts.git;a=commitdiff;h=89385ab41c09a8b4c8a630bfe385ea7a143e00ef

May be in a future F10 update; will be in rawhide soon.

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