[Top] [Prev] [Next] [Bottom]


[Contents] [Index]

srv - start server daemons

lib/srv [configuration_file]

Description

The srv command starts a suite of daemons. When these daemons are running on a computer, it is considered a network 'server'.

Configuration file

The lib/srv function uses a configuration file to initiate services. The default configuration file is located in

/services/server/config 

If the lib/srv command is invoked with a filename as a command line argument, the named file is used as a configuration file.

The configuration file is a plain text file, each line of which consists of three elements: the port name, the connection type, and the daemon command (and any command arguments). The port name and the connection type (currently either tcp or udp) should each be a single word.

For example, the default configuration file includes these lines (long line continuations are indented). The arguments to styxd, rstyxd, and infdb are a list of supported security algorithms.

# 
# Format: 
# 
# - port name - connection type - daemon command - command 
arguments - 
# 
infsigner  tcp /dis/lib/signer.dis 
infcsigner tcp /dis/lib/countersigner.dis 
inflogin   tcp /dis/lib/logind.dis 
styx       tcp /dis/lib/styxd.dis noauth nossl clear sha 
md5 rc4 sha/rc4 md5/rc4 
rstyx      tcp /dis/lib/rstyxd.dis noauth nossl clear sha 
md5 rc4 sha/rc4 md5/rc4 
infdb      tcp /dis/lib/dbsrv.dis noauth nossl clear sha 
md5 rc4 sha/rc4 md5/rc4 
virgil     udp /dis/lib/virgild.dis 

Daemons

When invoked with the default configuration file, the srv command starts the following set of daemons.
DAEMON PORT DESCRIPTION
lib/signer infsigner See signer, countersigner - daemons for set-top box authentication in Chapter 9
lib/countersigner infcsigner See signer, countersigner - daemons for set-top box authentication in Chapter 9
lib/logind inflogin See logind - login daemon in Chapter 9
file service styx See File service below.
remote execution services rstyx See rcmd - remote command execution in Chapter 5.
lib/dbsrv infdb See DB - database support in Chapter 15
lib/virgild virgil See virgild - connection service for remote clients

Initialization

Prior to starting the daemons, the srv command defines its name space according to the specification in file server/namespace (relative to the current directory). See newns - build a new name space from a description file in Chapter 15 for the specification format.

The srv command also starts the connection service for resolving network addresses. See cs - start connection server daemon command.

File service

The srv command spawns a thread that monitors requests on the styx service port. For each incoming request, yet another thread is spawned to authenticate the connection and provide access to the local file system. See dial, announce, export, listen - network connections in Chapter 8 for the discussion of the export function.

Remote execution services

Among the daemons created by the srv command is a thread that monitors requests on service port rstyx. These requests represent requests by clients for commands to be executed on the server.

See rcmd - remote command execution in Chapter 5 for the description of a client interface for sending command requests to a server.

Each incoming request is logged to the server's console. The message includes the client's network address.

The client's request must consist of two lines:
Line 1 A decimal integer representing the number of bytes in the following line.
Line 2 The command and arguments, if any to be executed on the server.

The client's commands are executed with the same Inferno user ID that was used when the srv command was issued.

The client's commands are executed on the server with standard input, output, and error redirected to the /dev/cons device on the client. This redirection requires that the client export its file system (see dial, announce, export, listen - network connections in Chapter 8) over the connection it creates to the server.

Termination

Once the daemons have been started, the srv command starts the Inferno shell (see sh - command line interface to the Inferno system in Chapter 5) to process command line input. The srv command does not terminate.

Files
/n/client Clients requesting remote command execution have their file system mounted on this server directory.
/n/client/dev Servers of remote execution request access the console device of the client via this directory.



[Top] [Prev] [Next] [Bottom]

infernosupport@lucent.com
Copyright © 1997, Lucent Technologies, Inc.. All rights reserved.