files.cfg
In files.cfg, you can centrally manage system configuration files (such as /etc/inetd.conf, /etc/motd, ...), and indeed any text file.
For example, you might manage your site-wide hosts.deny files with this files.cfg #include file:
///////////////////////////////////////////////////////////////////////////////
//
// hosts_deny_files.cfg
//
///////////////////////////////////////////////////////////////////////////////
/etc/hosts.deny mode 640 uid 0 gid 0
#if redhat
#
# hosts.deny This file describes the names of the hosts which are
# *not* allowed to use the local INET services, as decided
# by the '/usr/sbin/tcpd' server.
#
# The portmap line is redundant, but it is left to remind you that
# the new secure portmap uses hosts.deny and hosts.allow. In particular
# you should know that NFS uses portmap!
#elsif suse
# /etc/hosts.deny
# See 'man tcpd' and 'man 5 hosts_access' as well as /etc/hosts.allow
# for a detailed description.
http-rman : ALL EXCEPT LOCAL
#endif
///////////////////////////////////////////////////////////////////////////////
The advantages of centrally managing system configuration files include: having centralized backups, diffing and doing checksums against the central copy, easy access to common configuration file components, per-system customizations, no losing track of what you have written, greater understanding of the whole, etc.
In files.cfg (or any of its #include files), the form of a file stanza is:
<file> [path "<filepath>"]
[mode <octal filemode> uid <number> gid <number>]
<text line>
<text line>
...
files.cfg is much like programs.cfg, except that it can and should contain non-program files and/or programs external to the PIKT setup. Most of what is said about programs.cfg above applies also to files.cfg.
Specifying a file's mode (e.g., 644), uid (e.g., 0), and gid (e.g., 1) is optional. If they are absent, the defaults are 640, 0 & 0.
In files.cfg, unlike in programs.cfg, there is no default path: All file stanzas in files.cfg must include the "path" specification (or the stanza identifiers must be full pathnames.) (In programs.cfg, path-less programs get installed in the =piktdir/lib/programs directory.)
Refer to the sample files.cfg for more examples.
| | 1st page | next page |