File: cf.motd.example

package info (click to toggle)
cfengine 1.4.9-3
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 3,540 kB
  • ctags: 1,861
  • sloc: ansic: 25,408; sh: 1,708; perl: 1,088; lex: 690; makefile: 435; lisp: 182; yacc: 101; csh: 24
file content (53 lines) | stat: -rw-r--r-- 864 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
##################################################################
#
# cf.motd
#
# This file is used to set the message of the day file on
# each host
#
##################################################################
 
 #####
 #
 # BEGIN cf.motd
 #
 #####


control:

   #
   # This points to the file containing general text
   #

   masterfile = ( /iu/nexus/local/iu/etc/motd-master )
   addendum   = (  /iu/nexus/local/iu/etc/motd-nexus )

editfiles:

      { /etc/motd

      BeginGroupIfFileIsNewer "$(masterfile)"
        EmptyEntireFilePlease
        InsertFile "$(masterfile)"
        PrependIfNoSuchLine "This system is running $(class):$(arch)"
      EndGroup
      }

   nexus::

      { /etc/motd

      BeginGroupIfNoLineContaining "fileserver"
        InsertFile "$(addendum)"      
      EndGroup
      }

 #####
 #
 # BEGIN cf.motd
 #
 #####