Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ypxfr(8yp) — Ultrix/UWS 4.4 RISC

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ypfiles(5yp)

cron(8)

yppush(8yp)

ypserv(8yp)

ypsetup(8yp)

ypxfr(8yp)

Name

ypxfr − transfer a yellow pages (YP) map from a YP server to the local host. 

Syntax

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

Description

The ypxfr command moves a YP map, specified by the mapname argument, to the local host by making use of normal YP services.  It creates a temporary map in the directory /etc/yp/domain (which must already exist), fills it by enumerating the map’s entries, obtains the map parameters (master and order number) and loads them into the map. Once ypxfr has accomplished these tasks, it deletes any old versions of the map and moves the temporary map to the real mapname.

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 will append all its output to that file.  Since ypxfr is most often run from /usr/lib/crontab, or by ypserv, the log file can be used to retain a record of what was attempted, and the results.

For consistency between servers, ypxfr should be run periodically for every map in the YP database. Different maps change at different rates:  the services.byname map may not change for months at a time, for instance, and may therefore be checked only once a day. It is possible that mail.aliases or hosts.byname changes several times per day.  In such a case, it is appropriate to check hourly for updates.   A cron() entry should be used to perform periodic updates automatically on YP server machines only. Rather than having a separate cron entry for each map, commands can be grouped to update several maps in a shell script.  Examples (mnemonically named) are in /etc/yp: ypxfr_1perday.sh, ypxfr_2perday.sh, and ypxfr_1perhour.sh. They can serve as reasonable first cuts.

See ypfiles() and ypserv() for an overview of the yellow pages.

Options

−fForce the transfer to occur even if the version at the MASTER is not more recent than the local version. 

−cDo not send a "Clear current map" request to the local ypserv process.  This flag should be used if ypserv is not running locally at the time when ypxfr is running. Otherwise, ypxfr will report that it can not talk to the local ypserv, and the transfer will fail.

−h hostGet the map from host, regardless of which map is the master.  If host is not specified, ypxfr will ask the YP service for the name of the master, and try to get the map from there. The host option can be a name or an internet address in the form a.b.c.d . 

−d domainSpecify a domain other than the default domain. 

−C tid prog ipadd port
This option is only for use by ypserv. When ypserv invokes ypxfr, it specifies that ypxfr should call back a yppush process at the host with IP address ipaddr, registered as program number prog, listening on port port, and waiting for a response to transaction tid. 

Files

/etc/yp/ypxfr.log
/etc/yp/ypxfr_1perday.sh
/etc/yp/ypxfr_2perday.sh
/etc/yp/ypxfr_1perhour.sh
/usr/lib/crontab

See Also

ypfiles(5yp), cron(8), yppush(8yp), ypserv(8yp), ypsetup(8yp)

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