Bug 126542

Summary: im-switch overwrites existing content in /etc/sysconfig/i18n and/or ~/.i18n
Product: [Fedora] Fedora Reporter: Chong Kai Xiong <descender>
Component: im-sdkAssignee: Jens Petersen <petersen>
Status: CLOSED ERRATA QA Contact:
Severity: high Docs Contact:
Priority: medium    
Version: 2CC: eng-i18n-bugs
Target Milestone: ---Keywords: i18n
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 11.4-46.svn1587 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-06-26 02:53:59 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 125997    

Description Chong Kai Xiong 2004-06-22 22:24:09 UTC
Description of problem:
Using im-switch to change the system-wide or user-specific input
method completely overwrites existing content of /etc/sysconfig/i18n
and ~/.i18n respectively.

Version-Release number of selected component (if applicable):
iiimf-x-11.4-43

How reproducible:
Always

Steps to Reproduce:
1. start with non-empty and writeable /etc/sysconfig/i18n (or ~/.i18n)
2. set system wide input method as root with: im-switch -w -m method
(or im-switch -m method)

Actual results:
Existing content of /etc/sysconfig/i18n (or ~/.i18n) is completely
overwritten, leaving only the line: "XIM=method".

Expected results:
The "XIM=" line should be appended if it does not already exist.
Otherwise, it should be changed to the requested method.

Additional info:
The problem is caused by the following line in /usr/bin/im-switch:

  echo "XIM=$1" > /tmp/imswitcher$$

It should be '>>' instead of '>'.

Comment 1 Jens Petersen 2004-06-23 03:07:53 UTC
Thanks for catching this.

The fix has been committed for FC/devel and should appear
the next time im-sdk gets built.

Comment 2 Jens Petersen 2004-06-23 14:13:12 UTC
Fixed FC2 package 11.4-46.svn1587 should be appearing in
updates/testing/2 before long.