/usr/share/doc/cfengine2/examples/cf.preconf.example is in cfengine2 2.2.10-4build2.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
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 | #!/bin/sh
#
# cf.preconf is an emergency/bootstrap file to get things going
# in case cfengine is unable to parse its config file
#
backupdir=/iu/nexus/local/iu/etc
#
# If these files don't exist, you might not be able to parse cfengine.conf
#
if [ ! -s /etc/resolv.conf ]; then
echo Patching basics resolv.conf file
cat > /etc/resolv.conf << XX
domain iu.hio.no
nameserver 128.39.89.10
nameserver 158.36.144.156
XX
fi
#
# SVR4
#
if [ "$1" = "solaris" ]; then
if [ ! -s "/etc/passwd" ]; then
echo Patching missing passwd file
/bin/cp $backupdir/passwd /etc/passwd
fi
if [ ! -s "/etc/shadow" ]; then
echo Patching missing passwd file
/bin/cp $backupdir/shadow /etc/shadow
fi
if [ ! -s "/etc/group" ]; then
echo Patching missing group file
/bin/cp $backupdir/group.solaris /etc/group
fi
if [ "`/bin/egrep dns /etc/nsswitch.conf`" = "" ]; then
/bin/cp $backupdir/nsswitch.standalone /etc/nsswitch.conf
fi
fi
#
# BSD 4.3
#
if [ "$1" = "linux" ]; then
if [ ! -s "/etc/passwd" ]
then
echo Patching missing passwd file
/bin/cp $backupdir/passwd.slinux /etc/passwd
fi
if [ ! -s "/etc/group" ]
then
echo Patching missing group file
/bin/cp $backupdir/group.linux /etc/group
fi
fi
########
#
# END cf.preconf
#
########
|