Sophie

Sophie

distrib > Mandriva > 9.1 > ppc > by-pkgid > 054c3b3c3a084201aa61d47cc72dcba4 > files > 6

cfengine-1.6.5-1mdk.src.rpm

#! /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>
# modified for Linux-Mandrake by Frederic Lepied <flepied@mandrakesoft.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/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

exec >> $CFLOG

if [ -x $CFENGINE ]
then

    echo "===============================================================================" 
    date 
    echo "" 

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


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


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

    echo ""
fi