Sponsored Content
Operating Systems Solaris /etc/default/init LANG Setting Not Working Post 302960500 by kaledragule on Monday 16th of November 2015 11:23:36 AM
Old 11-16-2015
/etc/default/init LANG Setting Not Working

Hey guys,

I'm setting up a new server(Fujitsu M10-4 / Solaris 10 1/13) to move our app/DB and I'm having trouble figuring out why my LANG setting is not taking effect. I'm trying to set LANG=C in the /etc/default/init file which should make it the default system wide from what I gather. However it is always set to "en_US.UTF-8" when I log in. I've rebooted the server and removed/re-added the entry just to be sure, but no luck.

I can set the LANG setting to C in my shell manually, but it is not persistent when I switch over to bash or exit out. I've checked the /etc/profile, and the user profiles and I'm not finding anything that would be overriding the setting.

I suppose I can just set it in /etc/profile and the root profiles and call it a day, but I'd prefer to know exactly why the default init is not working for me. I'm hoping this is just something simple I'm missing. Anything to point me in the right direction would be appreciated.

Thanks

/etc/default/init contents:
Code:
#
# Copyright 1992, 1999-2002 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
#
#ident  "@(#)init.dfl   1.7     02/12/03 SMI"
#
# This file is /etc/default/init.  /etc/TIMEZONE is a symlink to this file.
# This file looks like a shell script, but it is not.  To maintain
# compatibility with old versions of /etc/TIMEZONE, some shell constructs
# (i.e., export commands) are allowed in this file, but are ignored.
#
# Lines of this file should be of the form VAR=value, where VAR is one of
# TZ, LANG, CMASK, or any of the LC_* environment variables.  value may
# be enclosed in double quotes (") or single quotes (').
#
TZ=US/Eastern
CMASK=022
LANG=C

---------- Post updated at 11:23 AM ---------- Previous update was at 11:21 AM ----------

Here are the locale settings:
Code:
# locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_ALL=
# locale -a
C
POSIX
en_CA
en_CA.ISO8859-1
en_CA.UTF-8
en_US
en_US.ISO8859-1
en_US.ISO8859-15
en_US.ISO8859-15@euro
en_US.UTF-8
es
es.UTF-8
es_MX
es_MX.ISO8859-1
es_MX.UTF-8
fr
fr.UTF-8
fr_CA
fr_CA.ISO8859-1
fr_CA.UTF-8
iso_8859_1

 

7 More Discussions You Might Find Interesting

1. AIX

Setting Variables not working

Hi all, I am trying to set up some variables in a shell script. The variables contain values of various paths needed to run a java module. The problem is the variables dont seem to be setting at all. here is what i am trying to do : JAR_HOME=/home/was5/bdcms/scheduledjobs/lib export... (1 Reply)
Discussion started by: rpandey
1 Replies

2. Solaris

Solaris 10 - init stops working

I have a really strange issue on Solaris 10 running on v490. I'm running Oracle 10g on the box. Everything runs fine and all of a sudden I get a call from a DBA. I check and none of the Oracle processes are running. They were definitely running after the system booted and nobody stopped them. I try... (0 Replies)
Discussion started by: GKnight
0 Replies

3. UNIX for Dummies Questions & Answers

Setting the $LANG info needed

Hello (Very New to UNIX -Solaris 10) I'm trying to set the LANG variable to C but not sure if it's getting set, need some help on this. Currently I have it set to en_GB.UTF-8 I need to set it to C for an install. but when I run set LANG=C and then run echo $LANG its still set to... (2 Replies)
Discussion started by: deedaz
2 Replies

4. Linux

How to I change init levels after typing init 1

Dear all, I typed in init 1 on my redhat box as root and according to wikipedia (http://en.wikipedia.org/wiki/Runlevel): 1 Single-User Mode Does not configure network interfaces, start daemons, or allow non-root logins So now I can't connect back to it. How do I change the init back to 3?... (8 Replies)
Discussion started by: z1dane
8 Replies

5. Debian

Iomega ix2-200 Custom Debian - Autostart script in init.d not Working

!!Hello Everyone!! I Recently purchased a Iomega iX2-200 NAS that runs a custom debian installed by Iomega (Linux Debian 5.0.2 ( 2.6.22.18 armv5tejl)) . I have SSH access. I installed Transmission since the factory installed torrents manager that Iomega uses is terrible. Transmission-daemon... (1 Reply)
Discussion started by: stejimenez
1 Replies

6. Red Hat

init-script failing because of /etc/rc.d/init.d/functions

I encountered a problem on one of our database servers. OS: CentOS 5.5 final Kernel: 2.6.18-238.5.1.el5.028stab085.2 (OpenVZ kernel) We wrote some DB-Start/Stop-scripts ("/db2/admin/scripts_dba/start_services.ksh" and ".../stop_services.ksh") to start the database instances. (Database... (1 Reply)
Discussion started by: bakunin
1 Replies

7. AIX

Undestanding LANG setting in /etc/environment

Hi All, We had issue with a application which reports process counts in log, application used to log process counts as Integer data type (1500). One fine morning we started seeing process counts in application log as Decimal (1,500). Our UNIX admin did investigate and figured-out that... (5 Replies)
Discussion started by: Aaron Boyce
5 Replies
catopen(3C)						   Standard C Library Functions 					       catopen(3C)

NAME
catopen, catclose - open/close a message catalog SYNOPSIS
#include <nl_types.h> nl_catd catopen(const char *name, int oflag); int catclose(nl_catd catd); DESCRIPTION
The catopen() function opens a message catalog and returns a message catalog descriptor. name specifies the name of the message catalog to be opened. If name contains a "/", then name specifies a complete pathname for the message catalog; otherwise, the environment variable NLSPATH is used and /usr/lib/locale/locale/LC_MESSAGES must exist. If NLSPATH does not exist in the environment, or if a message catalog cannot be opened in any of the paths specified by NLSPATH, then the default path /usr/lib/locale/locale/LC_MESSAGES is used. In the "C" locale, catopen() will always succeed without checking the default search path. The names of message catalogs and their location in the filesystem can vary from one system to another. Individual applications can choose to name or locate message catalogs according to their own special needs. A mechanism is therefore required to specify where the catalog resides. The NLSPATH variable provides both the location of message catalogs, in the form of a search path, and the naming conventions associated with message catalog files. For example: NLSPATH=/nlslib/%L/%N.cat:/nlslib/%N/%L The metacharacter % introduces a substitution field, where %L substitutes the current setting of either the LANG environment variable, if the value of oflag is 0, or the LC_MESSAGES category, if the value of oflag is NL_CAT_LOCALE, and %N substitutes the value of the name parameter passed to catopen(). Thus, in the above example, catopen() will search in /nlslib/$LANG/name.cat, if oflag is 0, or in /nlslib/{LC_MESSAGES}/name.cat, if oflag is NL_CAT_LOCALE. The NLSPATH variable will normally be set up on a system wide basis (in /etc/profile) and thus makes the location and naming conventions associated with message catalogs transparent to both programs and users. The full set of metacharacters is: %N The value of the name parameter passed to catopen(). %L The value of LANG or LC_MESSAGES. %l The value of the language element of LANG or LC_MESSAGES. %t The value of the territory element of LANG or LC_MESSAGES. %c The value of the codeset element of LANG or LC_MESSAGES. %% A single %. The LANG environment variable provides the ability to specify the user's requirements for native languages, local customs and character set, as an ASCII string in the form LANG=language[_territory[.codeset]] A user who speaks German as it is spoken in Austria and has a terminal which operates in ISO 8859/1 codeset, would want the setting of the LANG variable to be LANG=De_A.88591 With this setting it should be possible for that user to find any relevant catalogs should they exist. Should the LANG variable not be set, the value of LC_MESSAGES as returned by setlocale() is used. If this is NULL, the default path as defined in <nl_types.h> is used. A message catalogue descriptor remains valid in a process until that process closes it, or a successful call to one of the exec functions. A change in the setting of the LC_MESSAGES category may invalidate existing open catalogues. If a file descriptor is used to implement message catalogue descriptors, the FD_CLOEXEC flag will be set; see <fcntl.h>. If the value of oflag argument is 0, the LANG environment variable is used to locate the catalogue without regard to the LC_MESSAGES cat- egory. If the oflag argument is NL_CAT_LOCALE, the LC_MESSAGES category is used to locate the message catalogue. The catclose() function closes the message catalog identified by catd. If a file descriptor is used to implement the type nl_catd, that file descriptor will be closed. RETURN VALUES
Upon successful completion, catopen() returns a message catalog descriptor for use on subsequent calls to catgets() and catclose(). Oth- erwise it returns (nl_catd) -1. Upon successful completion, catclose() returns 0. Otherwise it returns -1 and sets errno to indicate the error. ERRORS
The catopen() function may fail if: EACCES Search permission is denied for the component of the path prefix of the message catalogue or read permission is denied for the message catalogue. EMFILE There are OPEN_MAX file descriptors currently open in the calling process. ENAMETOOLONG The length of the pathname of the message catalogue exceeds PATH_MAX, or a pathname component is longer than NAME_MAX. ENAMETOOLONG Pathname resolution of a symbolic link produced an intermediate result whose length exceeds PATH_MAX. ENFILE Too many files are currently open in the system. ENOENT The message catalogue does not exist or the name argument points to an empty string. ENOMEM Insufficient storage space is available. ENOTDIR A component of the path prefix of the message catalogue is not a directory. The catclose() function may fail if: EBADF The catalogue descriptor is not valid. EINTR The catclose() function was interrupted by a signal. USAGE
The catopen() and catclose() functions can be used safely in multithreaded applications, as long as setlocale(3C) is not being called to change the locale. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Standard | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ SEE ALSO
gencat(1), catgets(3C), gettext(3C), nl_types.h(3HEAD), setlocale(3C), attributes(5), environ(5) SunOS 5.10 29 Dec 1996 catopen(3C)
All times are GMT -4. The time now is 05:44 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy