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 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
|
#! /usr/bin/cfengine -f
control:
access = ( root )
domain = ( mycompany.com )
netmask = ( 255.255.255.0 )
timezone = ( EST )
mountpattern = ( / )
homepattern = ( home* )
sysadm = ( root )
editfilesize = ( 4192 )
adminfiles = ( /etc/cfengine )
actionsequence = (
checktimezone
editfiles
copy
tidy
shellcommands
links
)
broadcast:
ones
links:
linux::
/dev/core -> /proc/kcore
tidy:
Monday::
/ pattern=*.cfsaved recurse=inf age=7
/etc pattern=*.dpkg-* recurse=inf age=7
/ pattern=*~ recurse=inf age=7
# / pattern=*.bak recurse=inf age=7
/ pattern=#* recurse=inf age=7
any::
/ pattern=core recurse=inf age=1
disable:
/etc/hosts.equiv
/etc/nologin
copy:
$(adminfiles)/csh.login dest=/etc/csh.login m=644 o=root g=root
$(adminfiles)/csh.cshrc dest=/etc/csh.cshrc m=644 o=root g=root
$(adminfiles)/csh.alias dest=/etc/csh.alias m=644 o=root g=root
$(adminfiles)/csh.logout dest=/etc/csh.logout m=644 o=root g=root
$(adminfiles)/profile dest=/etc/profile m=644 o=root g=root
editfiles:
{ /etc/init.d/boot
SetCommentStart "#"
SetCommentEnd ""
WarnIfNoLineMatching '[#]*echo -n "Cleaning up /tmp... "'
LocateLineMatching '^echo -n "Cleaning up /tmp... "'
CommentToLineMatching 'echo "done."'
}
# local variables:
# tab-width: 4
# end:
|