Solaris Advanced Installation Guide

Preconfiguring With the Name Service

Preconfiguring system configuration information by editing the name service (NIS or NIS+) is recommended for SPARC-based systems. The following table gives a high-level overview of what you need to do.

To Preconfigure ... 

You Must Edit and Populate These Name Service Databases... 

Host name and IP address 

hosts

Date and time 

hosts (specify the timehost alias next to the host name of the system that will provide the date and time for the systems being installed)

Time zone 

timezone

Netmask 

netmasks

The procedure to preconfigure the locale for a system is different for each name service. See "How to Preconfigure Locale Using NIS" or "How to Preconfigure Locale Using NIS+".

How to Preconfigure 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, Locale Values for a list of valid locale values.


    Note -

    Not all languages or locales are available on all Solaris CDs. The 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 locale. The default locale you've specified will be used during the installation and for the desktop after the system is rebooted.

How to Preconfigure Locale Using NIS+

This procedure assumes the NIS+ domain is set up. Setting up the NIS+ domain is documented in the Solaris Naming Administration Guide.

  1. Log in to a name server as root or as a user in the NIS+ admin group.

  2. Use the following nistbladm command to create the locale table.


    # nistbladm -D access=og=rmcd,nw=r -c locale_tbl name=SI,nogw= locale=,nogw= 
    comment=,nogw= locale.org_dir.`nisdefaults -d`
     
    
  3. Add an entry to the locale table by typing the following nistbladm command.


    # nistbladm -a name=domain_name locale=locale comment=comment 
    locale.org_dir.`nisdefaults -d`
    

    domain_name

    Is either the domain name or a specific system name for which you want to preconfigure a default locale. 

    locale

    Is the locale you want installed on the system and for displaying the desktop after the system is rebooted. See Appendix E, Locale Values for a list of valid locale values.

    comment

    Is the comment field. Use double quotation marks to begin and end comments that are longer than one word. 


    Note -

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


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