This section describes accessing files (other than the X server file) that are located on a network host. For information on local file service (accessing files on a PCMCIA card or local diskette), see the System Administrator's Guide.
Configuring the Initial File Servers
The initial file servers are used for loading configuration files, fonts, and the rgb.txt file when the terminal boots and for accessing files while the terminal is running. The initial file servers are automatically entered into the file service table described in "Configuring the File Service Table".
The file-initial-server-1 and file-initial-server-2 remote configuration parameters permit you to define the primary and secondary initial file servers (Setup -> Change Setup Parameters -> File Service -> Initial File Server 1, Initial File Server 2).
If one of the initial file servers is set to IP address 0.0.0.0, the boot host is used as the file server and is automatically entered into the file service table. Normally, you cannot use the boot host for both initial file servers. If the IP addresses of both initial file servers are set to 0.0.0.0, the secondary initial file server is ignored unless they are using different file service protocols.
Table 5-14 file-initial-server-1 Parameter
Possible Values
Result
default
0.0.0.0
0.0.0.0
The boot host is the initial file server.
IP address or hostname
The primary initial file server.
Table 5-15 file-initial-server-2 Parameter
Possible Values |
Result |
default | 0.0.0.0 |
0.0.0.0 | The boot host is the secondary file server. |
IP address or hostname | The secondary initial file server. |
Table 5-16 file-initial-protocol-1 Parameter
Table 5-17 file-initial-protocol-2 Parameter
Configuring the File Service Table
After loading an X server, the terminal uses its file service table, defined in the file-service-table parameter, for all file access (Setup -> Change Setup Parameters -> File Service -> File Service Table). This table maps the default file locations known to the X server to the actual locations of files on file server hosts. The entries in each row of the file service table are described in Table 5-19.
If you have defined initial file servers, as explained in "Configuring the Initial File Servers", the initial file servers are automatically placed in the file service table. If the terminal is accessing files only from these hosts and the boot host and the files are in their default locations, no further configuration of the file service table is necessary.
If files required by the terminal are not on the boot host or designated initial file servers or are not in their default locations, configure the file service table to map the default file access points known by the X server to the actual file access points and actual host.
The default file locations known to the X server are listed in Table 5-18.
Table 5-18 Default File Locations
To change the file access point and the host:
Local
UNIX Mount
Point
with the default location.)
Server
entry you want to change, then type the name or IP address of the host in the text entry box.)
An example file service table follows:
file-service-table = {
{/usr/lib/X11/ncd/ nil eagle tftp /usr/local/lib/X11/ncd/ unknown 3 30 8192 8192}
{/var/tmp nil eagle nfs /var/tmp unknown 3 30 8192 8192}
}
When attempting a file access, the terminal compares the file request with the local mount points in the file service table. By default, the terminal tries only the longest matching pathname (or pathnames, if there are matches of equal length). The longest match is the most complete match, the one that matches most or all of the elements in the pathname. You can configure the terminal to try all matching pathnames instead.
The file-try-all-matches-on-open parameter (Setup -> Change Setup Parameters -> File Service -> Try All Matches on Open) controls how the terminal uses file service table entries when trying to access a file.
Table 5-20 file-try-all-matches-on-open Parameter
Possible Values
Result
default
false
false
The terminal tries only the longest matches.
true
The terminal tries all matching pathnames, beginning with the longest match.
The two methods of matching are explained in more detail in the following subsections.
Trying Only the Longest Matches
/usr/lib/X11/ncd
/usr/lib/X11/ncd
/usr/lib/X11/ncd
/usr
You may wish to have several longest matches to ensure that the terminal can always find the font or other data it needs.
Trying All Matches
/usr/lib/X11/ncd/fonts/100dpi
/usr/lib/X11/ncd/fonts
/usr/lib/X11/ncd
/usr
/
/ncd
The first five mount points match this request and the terminal.
Configuring File Access through TFTP
Terminals can use TFTP to download the X server and other files at boot and for ongoing file access.
NCD does not recommend using TFTP for writing to diagnostic log files.
TFTP is implemented by a daemon program, tftpd(8), and configured in the boot host's /etc/inetd.conf file.
Secure versus Non-Secure TFTP
TFTP can run in two modes: secure mode (also called restricted mode) and non-secure mode.
If installing all files in the secure directory makes the directory too large, you can mount a file system partition, using the secure directory as the mount point. You could also use the secure directory only for X servers and use NFS as the access method for other files and fonts.
Non-Secure TFTP
Use non-secure TFTP when extra security is unnecessary. Non-secure TFTP is more flexible because chroot is not used. With non-secure TFTP, you can put X servers and modules in any directory. Note that when you use a non-standard directory for the X server or server modules, you must configure the terminal to find the files and configure the booting process to place the X server and modules in the desired location(s).
Make Sure TFTP Is Enabled on the Host
Consult your vendor documentation on how to make sure that TFTP is enabled. On some systems, you can use the following procedure:
tftp dgram udp wait root /usr/etc/in.tftpd in.tftpd
# ps -acx | grep inetd17601 ? I 0:12 inetd
#
kill -HUP 17601
tftp dgram udp wait root /usr/etc/in.tftpd in.tftpd -s /tftpboot
-s /tftpboot
to -s /usr/tftpboot
. Restart the inetd daemon as directed in Step 3. Then move the X servers to /usr/tftpboot and move /usr/lib/X11/ncd to /usr/tftpboot/usr/lib/X11/ncd.
On HP-UX systems after Version 7, TFTP is secure; the TFTP daemon's home directory is the secure directory /usr/tftpdir. Any files that the terminal accesses via TFTP should be placed in this directory.
Configuring File Access through NFS
The terminal can use NFS for accessing all files and for downloading an X server. When accessing files through NFS, the X server temporarily mounts the file system onto its internal path.
Configuring the Host for NFS File Access
/tftpboot/
/usr/tftpboot
#
exportfs -a
If the host exporting the file systems restricts mount requests to certain user or group IDs, set the file-nfs-uid and file-nfs-gid parameters to the relevant user ID (UID) and group ID (GID). These parameters are not available in the Setup menus.
The default value for both parameters is "-2", which corresponds to nobody. NFS handles requests that do not have a valid UID and GID by mapping them to the anonymous user. By default, the anonymous user is nobody. With user and group IDs of -2, files and directories must be world-readable and world-writable.
Table 5-21 file-nfs-uid Parameter
Possible Values
Result
default
-2
-2
Access is the same as the world permissions.
integer
The user ID of the requestor.
Table 5-22 file-nfs-gid Parameter
Possible Values
Result
default
-2
-2
Access is the same as the world permissions.
integer
The group ID of the requestor.
Setting the Unmount Timer for NFS File Access
The file-nfs-unmount-timeout parameter (Setup -> Change Setup Parameters -> File Service -> NFS Unmount Timeout) controls how long to wait before unmounting file systems because of inactivity. The default is 1800 seconds (30 minutes). An unmounted file system is remounted the next time the terminal tries to access a file.
Table 5-23 file-nfs-unmount-timeout Parameter
Possible Values
Result
default
1800
integer
Timeout (in seconds) before file systems are unmounted due to inactivity. Range: 1 - 3600.
Changing the Timeout for Failed File Servers
The file-failed-server-ignore-timeout parameter (Setup -> Change Setup Parameters -> File Service -> Failed Server Ignore Timeout) controls how long the terminal ignores a file server that has failed because of a network timeout error. When the terminal attempts to open a new file, it skips over the ignored servers.
The default timeout period is 120 seconds. A long timeout speeds up booting and session reset when the primary initial file server has failed.
Table 5-24 file-failed-server-ignore-timeout Parameter
Possible Values
Result
default
120
integer
The amount of time (in seconds) to ignore a file server that has failed because of a network timeout error.
Range: 1 - 600.
Issuing Extended File Service Diagnostic Messages
The file-extended-diagnostics parameter (Setup -> Change Setup Parameters -> File Service -> Extended Diagnostics) controls the extent of the file service diagnostics messages issued by the terminal. By default, a minimum number of messages are issued.
If you are having problems with the terminal accessing files, you can arrange to display more specific messages by setting this parameter to "true."
Table 5-25 file-extended-diagnostics Parameter
Possible Values
Result
default
false
false
Minimal file service diagnostic messages are issued.
true
Extended file service diagnostic messages are issued.