On Mon, 24 Feb 2003, Andrew Fant wrote:
>
> I was wondering if anyone had bothered to write any simpler init scripts
> for PCP that were a little less RedHat-centric. I'm working on a small
> testbed cluster that I want to use PCP on, and while it compiles fine, the
> init script is more or less useless as anything beside documentation of
> how it should be started. I can port it myself if I have to, but I would
> appreciate knowing if anyone had already done it and was willing to spare
> me a day of shell-hackery.
Most of the init script dependencies are wrapped in
/usr/share/pcp/lib/rc-proc.sh
If you don't want any notion of control or levels, then this is the
minimalist version of rc-proc.sh, and it works!
#
# Common sh(1) procedures to be used in PCP rc scripts
#
# Copyright (c) 2000,2003 Silicon Graphics, Inc. All Rights Reserved.
# $Id: rc-proc.sh,v 1.5 2001/09/19 04:09:08 markgw Exp $
#
# source the PCP configuration environment variables
. /etc/pcp.env
# These functions use chkconfig if available, else tolerate missing chkconfig
# command (as on SUSE) by manipulating symlinks in /etc/rc.d directly.
#
# Usage:
#
# is_chkconfig_on : return 0 if $1 is chkconfig "on" else 1
# chkconfig_on : chkconfig $1 "on"
# chkconfig_off : chkconfig $1 "off"
# chkconfig_on_msg: echo a message about how to chkconfig $1 on
#
#
# Return 0 if $1 is chkconfig "on" (enabled) at the current run level
# Handles missing chkconfig command and other assorted atrocities.
#
is_chkconfig_on()
{
return 0
}
#
# chkconfig "on" $1
# Handles missing chkconfig command.
# (this is used by the pcp rpm %post script)
#
chkconfig_on()
{
:
}
#
# chkconfig "off" $1
# Handles missing chkconfig command.
# (this is used by the pcp rpm %preun script)
#
chkconfig_off()
{
:
}
#
# Echo a message about how to chkconfig $1 "on"
# Tolerates missing chkconfig command
#
chkconfig_on_msg()
{
:
}
|