Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ypserv(8)

yppush(8)

ypfiles(4)

ypmapxlate(4)



  ypxfr(8)                            CLIX                            ypxfr(8)



  NAME

    ypxfr - Transfers an Network Information Service (NIS) map from an NIS
    server

  SYNOPSIS

    /etc/ypxfr [-f] [-h host] [-d domain] [-c] [-C tid prog ipadd port]
    mapname

  FLAGS

    -f     Forces the transfer to occur even if the version at the master is
           no more recent than the local version.

    -c     Suppresses the sending of a ``Clear current map'' request to the
           local ypserv process.  Use this flag if ypserv is not running
           locally at the time ypxfr is running.  Otherwise, ypxfr cannot
           communicate with the local ypserv and the transfer fails.

    -h host
           Gets the map from host, regardless of what the map says the master
           is.  If host is not specified, ypxfr asks the NIS service for the
           name of the master, and attempts to obtain the map from there.  The
           host parameter can be a name or an Internet address in the form
           a.b.c.d.

    -d domain
           Specifies a domain other than the host's default.

    -C tid prog ipaddr port
           This flag is used only by ypserv.  When ypserv invokes ypxfr, it
           specifies that ypxfr call back a yppush process at the host with
           Internet Protocol (IP) address ipaddr, registered as program number
           prog, listening on port port, and waiting for a response to
           transaction tid.

  DESCRIPTION

    The ypxfr command moves a Network Information Service (NIS) map to the
    local host by using normal NIS services.  The ypxfr command creates a
    temporary map in the directory /etc/yp/domain (which must already exist),
    fills the temporary map by enumerating the NIS map's entries, retrieves
    the map parameters (master and order number) from the NIS map and loads
    them to the temporary map.  It then deletes any old versions of the map
    and moves the temporary map to the real map name.

    If ypxfr is run interactively, it writes its output to the terminal.
    However, if it is invoked without a controlling terminal and if the log
    file /etc/yp/ypxfr.log exists, it appends all output to that file.  Since
    ypxfr is most often run from cron or by ypserv, the log file can be used



  2/94 - Intergraph Corporation                                              1






  ypxfr(8)                            CLIX                            ypxfr(8)



    to retain a record of the attempt and the results.

    For consistency between servers, ypxfr should be run periodically for
    every map in the NIS database.  Different maps change at different rates.
    For example, the services.byname map may not change for months at a time
    and may therefore be checked only once daily.  The mail.aliases or
    hosts.byname maps may change several times a day.  In this case, updates
    might be checked for on an hourly basis.  A crontab entry can be used to
    perform periodic updates automatically.  Rather than having a separate
    crontab entry for each map, commands can be grouped in a shell script to
    update several maps.  Examples in the /etc/yp directory are ypxfr1pdy.sh
    (one update per day), ypxfr2pdy.sh (two updates per day), and ypxfr1phr.sh
    (one update per hour).  These scripts can be used as is or modified.

    Note that only abbreviated map names less than 10 characters can be used.

    Refer to ypfiles(4) and ypserv(8) for an overview of NIS.

  EXAMPLES

    1.  To transfer the hosts.nam map from an NIS server to the local machine,
        enter:

        /etc/yp/ypxfr hosts.nam


    2.  To force transfer of the group.nam map from the host sys123 to the
        local machine, enter:

        /etc/yp/ypxfr -f -h sys123 group.nam


  FILES

    /etc/yp/ypxfr.log
           Log file for the ypxfr command.

    /etc/yp/ypxfr1pdy.sh
           Shell script that performs one update per day.

    /etc/yp/ypxfr2pdy.sh
           Shell script that performs two updates per day.

    /etc/yp/ypxfr1phr.sh
           Shell script that performs one update per hour.

    /etc/yp/YP_MAP_X_LATE
           Map name translation file.

  DIAGNOSTICS




  2                                              Intergraph Corporation - 2/94






  ypxfr(8)                            CLIX                            ypxfr(8)



    domainname hasn't been set on this machine.
           The domain name for this system has not been specified.  The ypinit
           command has probably not been executed.

  EXIT VALUES

    The ypxfr command exits with a value of 0 if successful.  If unsuccessful,
    it exits with a value of 1.

  RELATED INFORMATION

    Commands:  ypserv(8), yppush(8)

    Files:  ypfiles(4), ypmapxlate(4)

    CLIX Programming Guide






































  2/94 - Intergraph Corporation                                              3




Typewritten Software • bear@typewritten.org • Edmonds, WA 98026