Forum: CFEngine Help
Subject: Re: configure:14448: error: Cannot find OpenSSL on HP-UX 11.31.....
cfengine-3.2.4
Author: Beto
Link to topic: https://cfengine.com/forum/read.php?3,27200,27296#msg-27296
This is the pre-install script used in the PSF above:
#!/sbin/sh
########
# Product: cfengine
# Fileset: LATEST
# preinstall
# @(#) $Revision: 1.4 $
UTILS="/usr/lbin/sw/control_utils"
if [[ ! -f $UTILS ]]
then
echo "ERROR: Cannot find $UTILS"
exit 1
fi
. $UTILS
exitval=$SUCCESS
PATH=$SW_PATH:/usr/bin
export PATH
################################################################################
# FUNCTIONS
########
# Remove_obsolete()
#
# Arg: The argument should be the full software specification of a single
# product or fileset to be removed.
#
Remove_obsolete()
{
typeset sw=$1
typeset ropt
typeset swstatus
typeset -i retval
swstatus=`get_install_state $sw`
if [[ $swstatus != 'not found' ]]
then
msg NOTE "Removing obsolete fileset $sw"
ropt="-x logfile=0"
retval=$(swremove $ropt -x autoselect_dependents=false -x
enforce_dependencies=false\
"$sw" @ ${SW_ROOT_DIRECTORY} > /dev/null)
if [ $retval -ne 0 ]
then
msg error "Could not remove "$sw
fi
fi
return $?
}
PROCS="cf-agent cf-execd cf-monitord cf-serverd cfservd cfexecd cfagent"
FILESETS="
cfengine
DSAU.CSYNC-ENG-A-MAN
DSAU.DSAU-CSYNC-SRC
DSAU.DSAU-CSYNC-RUN
DSAU.DSAU-CSYNC2-RUN
"
##############################################################################
# MAIN
#
#######
# Stop daemons prior to updating them here. If the daemon MUST continue to run
# for the health of the system (for example, "cron"), then do not kill it
# here. The files to replace the running daemons will be in place when the
# system reboots.
for pr in $PROCS
do
kill_named_procs $pr SIGKILL
retval=$?
if [[ $retval -ne 0 ]]
then
echo "WARNING: Could not kill all "$pr" processes"
[[ $exitval -ne 1 && $retval -ne 0 ]] && exitval=$retval
fi
done
# Remove obsolete software structures that might be lingering on the system.
for sw in $FILESETS
do
Remove_obsolete $sw
retval=$?
[[ $exitval -ne $FAILURE && $retval -ne $SUCCESS ]] && exitval=$retval
# Remove_obsolete has already reported an error if one occured
done
# Remove the cfengine cached executables.
if [[ -d /var/cfengine/bin ]] ;
then
rm -f /var/cfengine/bin/*
fi
# Remove any obsolete files.
rm -f /usr/local/lib/libpromises.* /usr/local/lib/hpux32/libpromises.*
rm -f /sbin/init.d/cfs* /etc/rc.config.d/cfs*
exit 0
The output of the package builder is an install depot:
wilma:/home/root# ll cfengine-3.3.3-ia64-11.31.depot
-rw-r----- 1 root sys 9330375 Jun 20 14:12
cfengine-3.3.3-ia64-11.31.depot
To install the depot on a client (all previous versions will be uninstalled):
wilma:/home/root# swinstall -s ./cfengine-3.3.3-ia64-11.31.depot \*
wilma:/home/root# cp -p /usr/local/sbin/cf-* /var/cfengine/bin
wilma:/home/root# /sbin/init.d/cfengine3 start
_______________________________________________
Help-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/help-cfengine