Bug 199178 - Wrong login.conf syntax for localization examples
Summary: Wrong login.conf syntax for localization examples
Status: Closed FIXED
Alias: None
Product: Documentation
Classification: Unclassified
Component: Books & Articles (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Dru Lavigne
URL: https://www.freebsd.org/doc/handbook/...
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-05 18:08 UTC by Eugene R
Modified: 2015-07-25 14:16 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eugene R 2015-04-05 18:08:49 UTC
The FreeBSD Handbook section 23.2 (https://www.freebsd.org/doc/handbook/using-localization.html) gives example of setting locale environment variables via login[._]conf :
me:\
	:lang=zh_TW.Big5:\
	:setenv=LC_ALL=zh_TW.Big5:\
	:setenv=LC_COLLATE=zh_TW.Big5:\
	:setenv=LC_CTYPE=zh_TW.Big5:\
	:setenv=LC_MESSAGES=zh_TW.Big5:\
	:setenv=LC_MONETARY=zh_TW.Big5:\
	:setenv=LC_NUMERIC=zh_TW.Big5:\
	:setenv=LC_TIME=zh_TW.Big5:\
	....

However, this syntax fails (only first variable is set) because setenv capability of login.conf(5) actually accepts a comma-separated list of name=value pairs. Thus the example should be changed to
me:\
	:lang=zh_TW.Big5:\
	:setenv=LC_ALL=zh_TW.Big5,LC_COLLATE=zh_TW.Big5,LC_CTYPE=zh_TW.Big5,LC_MESSAGES=zh_TW.Big5,LC_MONETARY=zh_TW.Big5,LC_NUMERIC=zh_TW.Big5,LC_TIME=zh_TW.Big5:\

	....

(Has to be one line -- for some reason, login.conf does not tolerate whitespace or escaped newlines between setenv pairs)
Comment 1 commit-hook freebsd_committer freebsd_triage 2015-07-25 14:16:51 UTC
A commit references this bug:

Author: dru
Date: Sat Jul 25 14:15:55 UTC 2015
New revision: 47079
URL: https://svnweb.freebsd.org/changeset/doc/47079

Log:
  setenv syntax is comma-delimited. While here, fix another section's setenv example.

  PR: 199178
  Sponsored by: Essen DevSummit Hackathon

Changes:
  head/en_US.ISO8859-1/books/handbook/l10n/chapter.xml