localeadm - query and configure locales
localeadm [-lcst] [-q locale | region] [-h] [-d device]...
localeadm -r locale | region [-t] [-v] [-m] [-R root_path]
localeadm -a locale | region [-t] [-v] [-m] [-d device]... [-R root_path]
localeadm -f locale | region [-t] [-v] [-m] [-d device]... [-R root_path]
localeadm -h
localeadm -C
The localeadm utility queries and configures Solaris locales through a command line interface.
In query (-q) or list (-l) modes, localeadm displays information about locale packages that are installed on the system or that reside on a particular device or directory.
To make it easier for users to pick out locales, the output from localeadm consists of a list of country or region names rather than a list of packages. Users can use the output to determine which locales or regions to add or remove.
When the user specifies a locale or region to add or remove using the name given by the output of the list mode, localeadm calculates which locale packages need to be changed and add or remove them. localeadm uses pkgadd(1M) or pkgrm(1M) to add or remove packages.
If the locales changed were Asian locales, then extra processes such as input method server daemons might need to be started before the new locales work properly. Once the locales are installed, the user is prompted to either reboot the machine or manually start the daemons. The user is also given a list of daemons which need to be started.
All locales are part of a set geographic region. A locale is an indivisible part of a region. You cannot have a locale which doesn't exist in a region, or a region without locales. If you choose to add or remove a particular locale, all of the locales in the region to which it belongs will be added or removed. Likewise, if you query a locale, localeadm checks the system for the region of which the local is part.
The following options are supported:
-a locale | region
Specify locale or region as the short name displayed by the -l option. For example, the -l option outputs Australasia (aua), therefore, the argument for -a is aua.
This option requires the -d option with arguments. If necessary packages are already installed, localeadm does not overwrite them. It simply skips such packages.
If you use the -a and -m options with a locale that has already been added without desktop translated message packages, it adds the desktop translated message packages for that locale to the system.
Only superusers or others who have been assigned package administration access through role-based access control can use this option. See rbac(5) for information on adding and removing packages. See smc(1M) for information on setting up and adding users to a package manager role.
-c
Use this option in conjunction with the -l option to display the locale name with codeset in the format shown by the locale(1) command. For example, it displays fr_FR.ISO8859-1 as opposed to french.
-C
-d device
-f
Only superusers or others who have been assigned package administration access through role-based access control can use this option. See rbac(5) for information on adding and removing packages. See smc(1M) for information on setting up and adding users to a package manager role.
-h
-l
When you specify the -d option with -l, localeadm lists all of the locales or regions available on the device pointed to by the -d option arguments.
When you do not specify the -d option, localeadm -l lists all of the locales or regions installed on the current system.
When you specify the -t option with -l, localeadm lists all of the locales or regions that could possibly be added to the system.
-m
By default, with the -a option, localeadm adds the translated desktop message packages for the locale or region specified in the -a option argument. If you use the -a option with the -m option, the desktop translated message packages for the locale or region will not be added, thus effectively disabling the desktop translated messages support for that locale or region. If used with the -r option, localeadm will remove only the translated desktop message packages for the locale or region specified in the -r option argument.
If you use the -m option with a locale that has already been added without the translated desktop message packages it adds the translated desktop message packages for that locale to the system.
-q locale | region
-r locale | region
Specify locale or region as the short name displayed by the -l option. For example, the -l option outputs Australasia (aua), therefore, the argument for -a is aua.
Only superusers or others who have been assigned package administration access through role-based access control can use this option. See rbac(5) for information on adding and removing packages. See smc(1M) for information on setting up and adding users to a package manager role.
-R root_path
Note -
-s
Use this option in conjunction with the -l option to display listed regions or locales.
-t
Use this option with -a, -f or -r to list all operations to be done. It will not actually add or remove packages.
Use the this option with -l to list all of the locales or regions that could possibly be added to the system.
-v
This option works on localeadm add and remove commands. It does not work on individual pkgadd or pkgrm commands. It displays additional information, but only as part of the larger program.
Example 1 Listing All of the Locales and Codesets
The following example lists all of the geographic regions installed on the machine. All locales in the regions are listed by their codesets:
example% localeadm -lc
Example 2 Listing the Regions Available on a Solaris CD or DVD
The following example command checks the Solaris_10/Product directory of the CD or DVD mounted on /cdrom/cdrom0. It also lists the names of the regions that can be installed from packages in that directory. The -s option displays the region names without any locales.
example% localeadm -ls -d /cdrom/cdrom0
Example 3 Querying for a Locale
The following example queries whether the Central European region called ceu on the current machine.
example% localeadm -q ceu
Example 4 Removing Western European Locales
The following example removes all packages associated with the Western Europe region from the system, except for those packages needed by other regions.
example% localeadm -r weu
Example 5 Adding Russian Locales
The following example installs the Eastern Europe region, of which Russian locale is a part, from packages located in /net/sparc_images/export/pkgs.
example# localeadm -a ru_RU -d /net/sparc_images/export/pkgs
Example 6 Adding the Traditional Chinese Locale
The following example adds the Traditional Chinese region to the system. This differs from the previous example in that Traditional Chinese is installed as a geographic region rather than just a locale. This is the case for all Asian languages, for example, zh_TW, zh_CN, zh_HK, hi_IN, th_TH, ko_KR, ja.
# localeadm -a zh_TW -d /net/sparc_images/export/pkgs
The following exit values are returned when you invoke localeadmin without the -q (query) option:
0
1
The following exit values are returned when you invoke localeadmin with the -q (query) option:
0
1
2
/var/sadm/install/logs/localeadmin_install.date
/var/sadm/install/logs/localeadmin_uninstall.date
date is specified in YYYY_MM_DD format. If a particular day has multiple installs, date has a period (.) followed by a number appended to it, for example, 2003_10_20.1, 2003_10_20.2.
/tmp/locales.list
See attributes(5) for descriptions of the following attributes:
|
eject(1), locale(1), pkgadd(1M), pkgrm(1M), smc(1M), attributes(5), rbac(5)
Закладки на сайте Проследить за страницей |
Created 1996-2024 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |