Unwanted Files

This files_unwanted_objects.cfg example specifies unwanted files--files whose existence might trigger a warning, or that PIKT might automatically delete or move aside.  This objects file might be referenced by a Pikt script such as SystemFileExist.

///////////////////////////////////////////////////////////////////////////////
//
// files_unwanted_objects.cfg
//
///////////////////////////////////////////////////////////////////////////////

FilesUnwanted       // unwanted files whose presence prompts a warning,
                    // or possibly some action

// the format of this stanza is
// 
//      <file>                       :       <command>
// 
// a . (dot) says just to report file existence, else execute the <command>

///////////////////////////////////////////////////////////////////////////////

        /etc/nologin            :       .

///////////////////////////////////////////////////////////////////////////////

#if solaris

        /etc/rc3.d/S50apache    : =mv /etc/rc3.d/S50apache /etc/rc3.d/xS50apache
        /etc/rc3.d/S76snmpdx    : =mv /etc/rc3.d/S76snmpdx /etc/rc3.d/xS76snmpdx
        /etc/rc3.d/S77dmi       : =mv /etc/rc3.d/S77dmi /etc/rc3.d/xS77dmi
        /etc/rc3.d/S80mipagent  : =mv /etc/rc3.d/S80mipagent
                                      /etc/rc3.d/xS80mipagent

#endif  // solaris

///////////////////////////////////////////////////////////////////////////////

#if solaris | linux

#  if nosendmail
        /etc/rc2.d/S88sendmail  : =mv /etc/rc2.d/S88sendmail
                                      /etc/rc2.d/xS88sendmail
#  endif

#endif  // solaris | linux

[...]

///////////////////////////////////////////////////////////////////////////////

On the piktmaster system, we would install the FilesUnwanted.obj file to each PIKT slave system with, for example:

# piktc -iv +O FilesUnwanted +H all        [or: ... -H down]

For more examples, see Samples.

 
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
passwd/shadow
crosscheck
Pikt script