File: cfengine.in

package info (click to toggle)
cfengine 1.6.5-1sarge1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,596 kB
  • ctags: 22
  • sloc: makefile: 170; perl: 74; sh: 48
file content (120 lines) | stat: -rw-r--r-- 2,609 bytes parent folder | download
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
%README.Debian%

As of 1.6.3-9, the default location of the keys file is changed from
/var/run to /etc.  The postinst will move the keys file from the old
to the new location.

Please install the cfengine-doc package for the real documentation.

 -- Tollef Fog Heen <tfheen@debian.org>  Mon, 17 Sep 2001 00:37:24 +0200

%conffiles%
/etc/cfengine/cfengine.conf
/etc/cron.daily/cfengine
/etc/cron.weekly/cfengine
%dirs%
usr/share/doc/cfengine/examples
etc/cfengine
usr/share/man/man8
%postinst%
#! /bin/sh -e

if [ -f /etc/cfengine.conf ]; then
    echo "- Moving '/etc/cfengine.conf' to new home under '/etc/cfengine/'..."
    mv /etc/cfengine.conf /etc/cfengine/
fi

if [ -f /var/run/cfengine/keys ]; then
    echo "- Moving '/var/run/cfengine/keys' to new home under '/etc/cfengine/'..."
    mv /var/run/cfengine/keys /etc/cfengine/
fi

#DEBHELPER#
%prerm%
#! /bin/sh -e

#DEBHELPER#
%undocumented%
cfd.8
cfrun.8
cfkey.8
cfcron.8
cfdoc.1
cfmail.8
cfmailfilter.8
cfwrap.8
%cron.weekly%
#! /bin/sh
#
# cron script to rotate cfengine log files
#
# Written by Brian White <bcwhite@pobox.com>

cd /var/log
LOG=cfengine.log
KEEP=4

if [ -f $LOG ]; then
    savelog -u root -g adm -m 644 -c $KEEP $LOG >/dev/null
fi
%cron.daily%
#! /bin/sh
#
# Run cfengine if both the executable and config file are available.
# Support for retrieving admin files from CVS or RCS is included.
#
# Written by Brian White <bcwhite@pobox.com>

# Set run_cvs to "1" if you want to call CVS to get the latest version
# of the admin files.
run_cvs=0
CVSROOT=/var/lib/cvs;

# Set run_rcs to "1" if you want to call RCS to get the latest version
# of the admin files
run_rcs=0

CFENGINE=/usr/bin/cfengine
CFINPUTS=/etc/cfengine
CFCONF=cfengine.conf
CFLOG=/var/log/cfengine.log

export CVSROOT
export CFINPUTS

if [ -x $CFENGINE ]
then

    echo "===============================================================================" >> $CFLOG
    date >> $CFLOG
    echo "" >> $CFLOG

    if [ $run_cvs = 1 ]
    then
        cd /etc
	echo "----- Begin CVS Checkout -----" >>$CFLOG
        cvs -q checkout -P -A cfengine >>$CFLOG 2>&1
	echo "-----  End  CVS Checkout -----" >>$CFLOG
	echo "" >>$CFLOG
    fi


    if [ $run_rcs = 1 ]
    then
	echo "----- Begin RCS Checkout -----" >>$CFLOG
        find $CFINPUTS -type d -name RCS -exec "cd {}/..; co -q RCS/*" \; >>$CFLOG 2>&1
	echo "-----  End  RCS Checkout -----" >>$CFLOG
	echo "" >>$CFLOG
    fi


    if [ -f $CFINPUTS/$CFCONF ]
    then
	$CFENGINE -v -f $CFINPUTS/$CFCONF >> $CFLOG
    fi

    echo "" >> $CFLOG
fi
%manpages%
debian/local/vicf.8
build-tree/cfengine-1.6.5/doc/cfengine.8