This is cf3-reference.info, produced by makeinfo version 4.12 from
cf3-Reference.texinfo.

INFO-DIR-SECTION Cfengine Training
START-INFO-DIR-ENTRY
* cfengine Reference:
                        Cfengine is a language based framework
                        designed for configuring and maintaining
                        Unix-like operating systems attached
                        to a TCP/IP network.
END-INFO-DIR-ENTRY


File: cf3-reference.info,  Node: Variable context sys,  Prev: Variable context const,  Up: Special Variables

11.2 Variable context `sys'
===========================

System variables are derived from cfengine's automated discovery of
system values.  They are provided as variables in order to make
automatically adaptive rules for configuration, e.g.


files:

 any::

  "$(sys.resolv)"

      create        => "true",
      edit_line     => doresolv("@(this.list1)","@(this.list2)"),
      edit_defaults => reconstruct;

The above rule requires no class specification because the variable
itself is class-specific.

* Menu:

* Variable sys.arch::
* Variable sys.cdate::
* Variable sys.class::
* Variable sys.date::
* Variable sys.domain::
* Variable sys.fqhost::
* Variable sys.fstab::
* Variable sys.host::
* Variable sys.interface::
* Variable sys.ipv4::
* Variable sys.ipv4[eth1]::
* Variable sys.ipv4_1[eth1]::
* Variable sys.ipv4_2[eth1]::
* Variable sys.ipv4_3[eth1]::
* Variable sys.long_arch::
* Variable sys.maildir::
* Variable sys.os::
* Variable sys.ostype::
* Variable sys.release::
* Variable sys.resolv::
* Variable sys.uqhost::
* Variable sys.workdir::


File: cf3-reference.info,  Node: Variable sys.arch,  Next: Variable sys.cdate,  Prev: Variable context sys,  Up: Variable context sys

11.2.1 Variable sys.arch
------------------------

The variable gives the kernel's short architecture description.


# arch = x86_64


File: cf3-reference.info,  Node: Variable sys.cdate,  Next: Variable sys.class,  Prev: Variable sys.arch,  Up: Variable context sys

11.2.2 Variable sys.cdate
-------------------------

The date of the system in canonical form, i.e. in the form of a class.


# cdate = Sun_Dec__7_10_39_53_2008_


File: cf3-reference.info,  Node: Variable sys.class,  Next: Variable sys.date,  Prev: Variable sys.cdate,  Up: Variable context sys

11.2.3 Variable sys.class
-------------------------

This variable contains the name of the hard-class category for this
host, i.e. its top level operating system type classification.


# class = linux


File: cf3-reference.info,  Node: Variable sys.date,  Next: Variable sys.domain,  Prev: Variable sys.class,  Up: Variable context sys

11.2.4 Variable sys.date
------------------------

The date of the system as a text string.


# date = Sun Dec  7 10:39:53 2008


File: cf3-reference.info,  Node: Variable sys.domain,  Next: Variable sys.fqhost,  Prev: Variable sys.date,  Up: Variable context sys

11.2.5 Variable sys.domain
--------------------------

The domain name as divined by cfengine. If the DNS is in use, it could
be possible to derive the domain name from its DNS regisration, but in
general there is no way to discover this value automatically. The
`common control' body permits the ultimate specification of this value.


# domain = example.org


File: cf3-reference.info,  Node: Variable sys.fqhost,  Next: Variable sys.fstab,  Prev: Variable sys.domain,  Up: Variable context sys

11.2.6 Variable sys.fqhost
--------------------------

The fully qualified name of the host. In order to compute this value
properly, the domain name must be defined.


# fqhost = host.example.org


File: cf3-reference.info,  Node: Variable sys.fstab,  Next: Variable sys.host,  Prev: Variable sys.fqhost,  Up: Variable context sys

11.2.7 Variable sys.fstab
-------------------------

The location of the system filesystem (mount) table.


# fstab = /etc/fstab


File: cf3-reference.info,  Node: Variable sys.host,  Next: Variable sys.interface,  Prev: Variable sys.fstab,  Up: Variable context sys

11.2.8 Variable sys.host
------------------------

The name of the current host, according to the kernel. It is undefined
whether this is qualified or unqualified with a domain name.


# host = myhost


File: cf3-reference.info,  Node: Variable sys.interface,  Next: Variable sys.ipv4,  Prev: Variable sys.host,  Up: Variable context sys

11.2.9 Variable sys.interface
-----------------------------

The assumed (default) name of the main system interface on this host.


# interface = eth0


File: cf3-reference.info,  Node: Variable sys.ipv4,  Next: Variable sys.ipv4[eth1],  Prev: Variable sys.interface,  Up: Variable context sys

11.2.10 Variable sys.ipv4
-------------------------

All four octets of the IPv4 address of the system interface named as
the associative array index, e.g. `$(ipv4_1[$(interface)])'.


# The IP on the default interface
#        ipv4 = 192.168.1.101

# The octets of all interfaces as an associative array
# ipv4_1[le0] = 192
# ipv4_2[le0] = 192.168
# ipv4_3[le0] = 192.168.1
#   ipv4[le0] = 192.168.1.101


File: cf3-reference.info,  Node: Variable sys.ipv4[eth1],  Next: Variable sys.ipv4_1[eth1],  Prev: Variable sys.ipv4,  Up: Variable context sys

11.2.11 Variable sys.ipv4[eth1]
-------------------------------

The IPv4 address of the default system interface.


# The IP on the default interface
#        ipv4 = 192.168.1.101

# The octets of all interfaces as an associative array
# ipv4_1[le0] = 192
# ipv4_2[le0] = 192.168
# ipv4_3[le0] = 192.168.1
#   ipv4[le0] = 192.168.1.101


File: cf3-reference.info,  Node: Variable sys.ipv4_1[eth1],  Next: Variable sys.ipv4_2[eth1],  Prev: Variable sys.ipv4[eth1],  Up: Variable context sys

11.2.12 Variable sys.ipv4_1[eth1]
---------------------------------

The first octet of the IPv4 address of the system interface named as
the associative array index, e.g. `$(ipv4_1[$(interface)])'.


# The IP on the default interface
#        ipv4 = 192.168.1.101

# The octets of all interfaces as an associative array
# ipv4_1[le0] = 192
# ipv4_2[le0] = 192.168
# ipv4_3[le0] = 192.168.1
#   ipv4[le0] = 192.168.1.101


File: cf3-reference.info,  Node: Variable sys.ipv4_2[eth1],  Next: Variable sys.ipv4_3[eth1],  Prev: Variable sys.ipv4_1[eth1],  Up: Variable context sys

11.2.13 Variable sys.ipv4_2[eth1]
---------------------------------

The first two octets of the IPv4 address of the system interface named
as the associative array index, e.g. `$(ipv4_1[$(interface)])'.


# The IP on the default interface
#        ipv4 = 192.168.1.101

# The octets of all interfaces as an associative array
# ipv4_1[le0] = 192
# ipv4_2[le0] = 192.168
# ipv4_3[le0] = 192.168.1
#   ipv4[le0] = 192.168.1.101


File: cf3-reference.info,  Node: Variable sys.ipv4_3[eth1],  Next: Variable sys.long_arch,  Prev: Variable sys.ipv4_2[eth1],  Up: Variable context sys

11.2.14 Variable sys.ipv4_3[eth1]
---------------------------------

The first three octets of the IPv4 address of the system interface named
as the associative array index, e.g. `$(ipv4_1[$(interface)])'.


# The IP on the default interface
#        ipv4 = 192.168.1.101

# The octets of all interfaces as an associative array
# ipv4_1[le0] = 192
# ipv4_2[le0] = 192.168
# ipv4_3[le0] = 192.168.1
#   ipv4[le0] = 192.168.1.101


File: cf3-reference.info,  Node: Variable sys.long_arch,  Next: Variable sys.maildir,  Prev: Variable sys.ipv4_3[eth1],  Up: Variable context sys

11.2.15 Variable sys.long_arch
------------------------------

The long architecture name for this system kernel. This name is
sometimes quite unwieldy but can be useful for logging purposes.


# long_arch = linux_x86_64_2_6_22_19_0_1_default__1_SMP_2008_10_14_22_17_43__0200


File: cf3-reference.info,  Node: Variable sys.maildir,  Next: Variable sys.os,  Prev: Variable sys.long_arch,  Up: Variable context sys

11.2.16 Variable sys.maildir
----------------------------

The name of the system email spool directory.


# maildir = /var/spool/mail


File: cf3-reference.info,  Node: Variable sys.os,  Next: Variable sys.ostype,  Prev: Variable sys.maildir,  Up: Variable context sys

11.2.17 Variable sys.os
-----------------------

The name of the operating system according to the kernel.


# os = linux


File: cf3-reference.info,  Node: Variable sys.ostype,  Next: Variable sys.release,  Prev: Variable sys.os,  Up: Variable context sys

11.2.18 Variable sys.ostype
---------------------------

Another name for the operating system.


# ostype = linux_x86_64


File: cf3-reference.info,  Node: Variable sys.release,  Next: Variable sys.resolv,  Prev: Variable sys.ostype,  Up: Variable context sys

11.2.19 Variable sys.release
----------------------------

The kernel release of the operating system.


# release = 2.6.22.19-0.1-default


File: cf3-reference.info,  Node: Variable sys.resolv,  Next: Variable sys.uqhost,  Prev: Variable sys.release,  Up: Variable context sys

11.2.20 Variable sys.resolv
---------------------------

The location of the system resolver file.


# resolv = /etc/resolv.conf


File: cf3-reference.info,  Node: Variable sys.uqhost,  Next: Variable sys.workdir,  Prev: Variable sys.resolv,  Up: Variable context sys

11.2.21 Variable sys.uqhost
---------------------------

The unqualified name of the current host. See also `sys.fqhost'.


# uqhost = myhost


File: cf3-reference.info,  Node: Variable sys.workdir,  Prev: Variable sys.uqhost,  Up: Variable context sys

11.2.22 Variable sys.workdir
----------------------------

The location of the cfengine work directory and cache. For the system
privileged user this is normally:


# workdir = /var/cfengine

   For non-privileged users it is in the user's home directory:


# workdir = /home/user/.cfagent


