divine - network configuration component for LCFG.
This object configures and controls the divine network probe. The probe method is called when one of the controlled interface comes, up to probe the network and determine the appropriate "scheme". The interface is set accordingly, and affected LCFG components (such as mail) are reconfigured by using the context mechanism. The run method can be used to initiate a probe manually.
If an interface is a wireless interface, then all the specified wireless network names will be probed, in the order that they appear in the scheme list. All schemes corresponding to a particular network will be probed in parallel. If the interface is not a wireless network, then all non-wireless schemes will be probed in parallel. Default schemes will be tried if all probes fail. DHCP is used if no explicit IP address is given.
Most addresses can be specified as DNS names or numbers. However, if the hostnames are not in the local DNS, they must be specified as numbers, otherwise they will not be available when booting on remote networks.
The following options are supported by the start, run and probe methods:
The number of times to retry an arp request when probing the network. Small values may fail to detect networks with a slow arp response. Large values will increase the time required to probe a series of networks. The default value is set by the arptries resource.
Output progress to /dev/console.
Debugging.
The number of times to retry a DHCP request. Small values may fail to detect networks with a slow DHCP response. Large values will increase the time required to probe a series of networks. The default value is set by the dhcptries resource.
The given reason for the network probe is noted in any informational messages. This set to the interface name, for example, when a probe occurs because the interface is coming up.
Attempt to set the specified scheme (only). No attempt is made to probe or to determine the applicability of the scheme. The scheme is attempted on all interfaces in the if resource.
The timeout on DHCP requests. Small values may fail to detect networks with a slow DHCP response. Large values will increase the time required to probe a series of networks. The default value is set by the dtimeout resource.
Verbose. Displays all probe attempts.
The timeout on wireless access point detection. Small values may fail to detect networks with a slow AP response. Large values will increase the time required to probe a series of networks. The default value is set by the wtimeout resource.
The number of times to retry an arp request when probing the network. Small values may fail to detect networks with a slow arp response. Large values will increase the time required to probe a series of networks. The default value is 6.
Use dhclient instead of pump for DHCP.
The number of times to retry a DHCP request. Small values may fail to detect networks with a slow DHCP response. Large values will increase the time required to probe a series of networks. The default value is 2.
The timeout on DHCP requests. Small values may fail to detect networks with a slow DHCP response. Large values will increase the time required to probe a series of networks. The default value is 2.
A (space-separated) list of interfaces to be controlled by divine. Each interface will be tried in the given order and the first interface which matches a particular scheme will be set accordingly. All other interfaces will be disabled.
The type of the specified interface. If the interface is supported by the "linkstatus" command, then this can be used to determine whether or not the interface cable is connected. This means that the schemes can be probed faster because there is no need to wait for ARP timeouts on disconnected interfaces. Supported types are "mii" and "eepro100". The default is null (interface type unknown), in which case no test is made for the presence of the cable.
A (space-separated) list of scheme tags. This should include at least one scheme conventionally named default which specifies the normal default network parameters.
A (space-separated) list of filenames assumed to contain process IDs. When the scheme changes, each process will be sent a USR2 signal and the name of the new scheme will be in /var/lcfg/tmp/schemes.scheme. This can be used by processes to monitor and display scheme changes (eg. the "sleepbutton" provided with obj-kdm). The variable %HOME is substituted with the home directory of the user at the console, and the process kill is run under the uid of the pidfile owner. The default is %HOME/.schemes.pid.
If this resource is true, divine will add a default for route for the specific gateway. If it is false, it will generate resources for a routing component to handle the routing.
This resource specifies a (space-separated) list of files containing scheme data that will be read before (and take precedence over) the schemes specified in the resources. This is intended to allow a user to create temporary schemes, eg. while travelling with a portable. These files are normally managed with the scheme editor nse. Ability to change this file gives a user the equivalent of root permission. The variable %HOME is substituted with the home directory of the user at the console, so typical values might be: %HOME/.schemes or /home/owner/.schemes.
If this resource is non-null, it should be a profile "context" which will be used for schemes which don't specify an explicit context. (This is in addition to the scheme=name context).
If this resource is non-null, it should be a profile "context" which will be set when no network scheme can be detected. (This is in addition to the scheme= context).
If this resource is true, then the IP address is registered in /etc/hosts as the address of the host.
The name of a sound file to play when a network scheme is successfully selected.
The name of a sound file to play when no network scheme can be selected.
The options to be applied to divconf when it is called because an interface has come up.
The timeout on wireless access point detection. Small values may fail to detect networks with a slow AP response. Large values will increase the time required to probe a series of networks. The default value is 0.5.
An optional description of the scheme.
A (space-separated) list of interfaces for which this scheme is appropriate. If this field is blank, the scheme is a candidate for all interfaces. Use "ppp0" for schemes which are intended only for dialup.
The name of a wireless network to which the scheme should be applied. If this is blank, the scheme applies only to wired interfaces. The name may be prefixed with /ad-hoc for an ad-hoc network (default is "/managed").
A (space-separated) list of access point MAC addresses for which this scheme is valid. By default, schemes are valid for any AP. Mac Addresses must have the form XX:XX:XX:XX:XX:XX.
The WEP encryption key for this wireless network as a hex string, or in the form "s:PASSWORD". If this is blank, no encryption is performed. This field is ignored for wired networks.
The size (in bits) of the netmask for this network. If an explicit IP address is specified, the default value is determined from the given IP address. If no explicit IP address is given, this value is ignored and the value supplied by DHCP/PPP is used.
The name of script to execute when this scheme is detected. The name of the scheme is passed as an argument, and the script is run with the uid of the user owning the scheme file. The script is executed in the background with input and output to /dev/null.
The name of a host to use as the mail relay. Local mail will always be delivered via the local sendmail program which will forward it to this relay. If this is blank, then the LCFG-defined default mail relay will be used. Setting this to "localhost" will cause the local sendmail to deliver mail directly; this is usually necessary when connected to a foreign network.
A context to be passed to the LCFG profile component. This can used to tune the system configuration towards the type of connection. The default is set by the defcontext resource (normally "net=remote"). The additional context "scheme=ID" is also selected.
The IP address (or hostname) to which the host should be configured if this scheme is detected. If this is blank, then DHCP will be used in an attempt to determine the host address. If a name is specified in the LCFG (rather than an IP number), then the name must be available in the local DNS server. This field is ignored for dialup schemes and the IP address is determined via PPP.
The IP address (or hostname) of one or more well-known hosts (eg. the gateway) to be probed to identify this scheme. If this is blank, the scheme will be applied as a default if all others fail. Note that more than one default scheme is not meaningful, unless they are on different wireless networks. If a name is specified in the LCFG (rather than an IP number), then the name must be available in the local DNS server. This field is not used for dialup connections.
The IP address (or hostname) of the gateway corresponding to this scheme. This value is set automatically if DHCP is being used (IP field is blank), or when using a dialup scheme. If a name is specified in the LCFG (rather than an IP number), then the name must be available in the local DNS server. The special value <route> indicates that the existing default values for the routing component will be used to set up the routing.
The IP addresses (or hostnames) of DNS servers to use with this scheme. These hosts will be used as forwarders by the local DNS server which is always queried first. If this is blank, then the default forwarders will be used. If it is *, then no forwarders will be set. If a name is specified in the LCFG (rather than an IP number), then the name must be available in the local DNS server. If left blank, DHCP and PPP will supply these values automatically.
Fedora3, Redhat9
Paul Anderson <dcspaul@inf.ed.ac.uk>