Solaris Advanced Installation Guide

How to Preconfigure Language or Locale Using NIS

  1. As root on the name server, edit the /var/yp/Makefile file.

    Add the following text after the other *.time entries.

    locale.time:  $(DIR)/locale
            -@if [ -f $(DIR)/locale ]; then \
                   sed -e "/^#/d" -e s/#.*$$// $(DIR)/locale \
                   | awk '{for (i = 2; i<=NF; i++) print $$i, $$0}' \
                   | $(MAKEDBM) - $(YPDBDIR)/$(DOM)/locale.byname; \
                   touch locale.time; \
                   echo "updated locale"; \
                   if [ ! $(NOPUSH) ]; then \
                           $(YPPUSH) locale.byname; \
                           echo "pushed locale"; \
                   else \
                   : ; \
                   fi \
            else \
                   echo "couldn't find $(DIR)/locale"; \
            fi
  2. Add locale to the line starting with the word all and add locale: locale.time on a new line.

    all: passwd group host ethers networks rpc services protocols netgroup 
    bootparams aliases \
    timezone locale
    locale: locale.time
    
  3. Create the file /etc/locale and make one entry for each domain or a specific system.

    locale   domain_name
    

    or

    locale   system_name
    

    For example, the following line specifies French to be the default language for the worknet.com domain:


    fr worknet.com

    For example, the following line specifies French Belgium to be the default locale for a system named sherlock:


    fr_BE sherlock 

    See Appendix E, Language and Locale Values for a list of valid language and locale values.


    Note -

    Not all languages or locales are available on all Solaris CDs. The language or locale you select will be used for installation if it is on the Solaris CD.


  4. Make the maps.


    # cd /var/yp; make
    

Systems specified by domain or individually in the locale map are now set up to use the default language or locale. The default language or locale you've specified will be used during the installation and for the desktop after the system is rebooted.