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.

prev page 1st page next page
 
Home | FAQ | News | Intro | Samples | Tutorial | Reference | Software
Developer's Notes | Licensing | Authors | Pikt-Users | Pikt-Workers | Related Projects | Site Index | Privacy Policy | Contact Us
Page best viewed at 1024x768 or greater.   Page last updated 2019-01-12.   This site is PIKT® powered.
Copyright © 1998-2019 Robert Osterlund. All rights reserved.
Home FAQ News Intro Samples Tutorial Reference Software
PIKT Logo
PIKT Page Title
View sample
hosts, aliases
& groups