PLATFORM_IF_MATCH(linux)
PLATFORM_ELSE
PLATFORM_ENDIF
&1
printf "*** exec /usr/local/bin/chpst -e /usr/local/etc/default/bcfg2-client/env ./bcfg2-client.sh ...\n"
exec /usr/local/bin/chpst -e /usr/local/etc/default/bcfg2-client/env ./bcfg2-client.sh
]]>
&1
exec /usr/local/bin/svlogd -tt /usr/local/var/svlogd/bcfg2-client
]]>
&1
/usr/local/bin/chpst -e /usr/local/etc/default/bcfg2-server/env /bin/sh -c '\
printf "*** exec /usr/local/bin/bcfg2-server ${OPTIONS} ...\n"'
exec /usr/local/bin/chpst -e /usr/local/etc/default/bcfg2-server/env /bin/sh -c '\
exec /usr/local/bin/bcfg2-server ${OPTIONS}'
]]>
&1
exec /usr/local/bin/svlogd -tt /usr/local/var/svlogd/bcfg2-server
]]>
${BASEDIR}/postinstall.log 2>&1 3>&1
else
printf "\npostinstall: already ran\n\t${BASEDIR}/b2-regexplace.sh, not running again...\n" >> ${BASEDIR}/postinstall.log
fi
# Make sure log directories exist
test -d /usr/local/var || mkdir /usr/local/var
test -d $SVLOGD || mkdir $SVLOGD
test -d $SVLOGD/bcfg2-client || mkdir $SVLOGD/bcfg2-client
test -d $SVLOGD/bcfg2-server || mkdir $SVLOGD/bcfg2-server
# Make sure environment directories exist
test -d /usr/local/etc || mkdir /usr/local/etc
test -d $DEFAULT || mkdir $DEFAULT
test -d $DEFAULT/bcfg2-client || mkdir $DEFAULT/bcfg2-client
test -d $DEFAULT/bcfg2-client/env || mkdir $DEFAULT/bcfg2-client/env
test -d $DEFAULT/bcfg2-server || mkdir $DEFAULT/bcfg2-server
test -d $DEFAULT/bcfg2-server/env || mkdir $DEFAULT/bcfg2-server/env
# Put in default client environment if it didn't exist
if [ ! -f $DEFAULT/bcfg2-client/.SENTINEL ]; then
touch $DEFAULT/bcfg2-client/.SENTINEL
echo "-q -v -d -n" > $DEFAULT/bcfg2-client/env/OPTIONS
echo "3600" > $DEFAULT/bcfg2-client/env/RUN_INTERVAL_SECONDS
fi
# Put in default server environment if it didn't exist
if [ ! -f $DEFAULT/bcfg2-server/.SENTINEL ]; then
touch $DEFAULT/bcfg2-server/.SENTINEL
echo "-v" > $DEFAULT/bcfg2-server/env/OPTIONS
fi
]]>
description Bcfg2 - Provides a declarative interface to system configuration
prereq pkgspec >= bcfg2-python-2.4.4
prereq pkgspec >= bcfg2-elementtree-1.2.6
prereq pkgspec >= bcfg2-m2crypto-0.17