=========================================================================== mgmt/pcp/build/rpm/pcp.spec.in =========================================================================== --- a/mgmt/pcp/build/rpm/pcp.spec.in 2008-03-12 17:57:01.000000000 +1100 +++ b/mgmt/pcp/build/rpm/pcp.spec.in 2008-03-12 17:56:13.142211083 +1100 @@ -137,10 +137,10 @@ [ -x $PCP_RC_DIR/pmproxy ] && PCP_RC_DIR/pmproxy stop >/dev/null 2>&1 rm -f $PCP_VAR_DIR/pmns/.NeedRebuild else - PCP_SH_WHICH=type + PCP_WHICH_PROG=type fi - if $PCP_SH_WHICH chkconfig >/dev/null 2>&1 + if $PCP_WHICH_PROG chkconfig >/dev/null 2>&1 then chkconfig --del pcp >/dev/null 2>&1 chkconfig --del pmie >/dev/null 2>&1 @@ -191,10 +191,7 @@ done fi - # - # the chkconfig thing - # - if $PCP_SH_WHICH chkconfig >/dev/null 2>&1 + if $PCP_WHICH_PROG chkconfig >/dev/null 2>&1 then chkconfig --add pcp >/dev/null 2>&1 chkconfig --add pmie >/dev/null 2>&1 @@ -237,9 +234,6 @@ touch $PCP_VAR_DIR/pmns/.NeedRebuild chmod 644 $PCP_VAR_DIR/pmns/.NeedRebuild - # - # the chkconfig thing - # if which chkconfig >/dev/null 2>&1 then chkconfig --add pcp >/dev/null 2>&1 =========================================================================== mgmt/pcp/build/rpm/pro.spec.in =========================================================================== --- a/mgmt/pcp/build/rpm/pro.spec.in 2008-03-12 17:57:01.000000000 +1100 +++ b/mgmt/pcp/build/rpm/pro.spec.in 2008-03-12 17:56:42.074461524 +1100 @@ -183,10 +183,10 @@ . /etc/pcp.env $PCP_RC_DIR/pmclusterd stop >/dev/null 2>&1 else - PCP_SH_WHICH=type + PCP_WHICH_PROG=type fi - if $PCP_SH_WHICH chkconfig >/dev/null 2>&1 + if $PCP_WHICH_PROG chkconfig >/dev/null 2>&1 then chkconfig --del pmclusterd >/dev/null 2>&1 else @@ -249,10 +249,7 @@ ;; esac -# -# the chkconfig thing -# -if $PCP_SH_WHICH chkconfig >/dev/null 2>&1 +if $PCP_WHICH_PROG chkconfig >/dev/null 2>&1 then chkconfig --add pmclusterd >/dev/null 2>&1 fi =========================================================================== mgmt/pcp/configure.in =========================================================================== --- a/mgmt/pcp/configure.in 2008-03-12 17:57:01.000000000 +1100 +++ b/mgmt/pcp/configure.in 2008-03-12 17:34:03.762742540 +1100 @@ -507,10 +507,14 @@ fi AC_SUBST(grep) -which=which -if sh -c 'type -p sh' >/dev/null 2>&1 +if test -n "$WHICH" +then + which=$WHICH +elif sh -c 'type -p sh' >/dev/null 2>&1 then which=type +else + which=which fi AC_SUBST(which) =========================================================================== mgmt/pcp/src/include/pcp.conf.in =========================================================================== --- a/mgmt/pcp/src/include/pcp.conf.in 2008-03-12 17:57:01.000000000 +1100 +++ b/mgmt/pcp/src/include/pcp.conf.in 2008-03-12 17:06:17.739792311 +1100 @@ -1,7 +1,7 @@ # # Copyright (c) 2000-2001,2003 Silicon Graphics, Inc. All Rights Reserved. # -# $Id: pcp.conf.in,v 1.30 2008/03/12 05:49:52 kimbrr Exp $ +# $Id: pcp.conf.in,v 1.29 2007/03/30 09:30:06 kimbrr.bonnie.engr.sgi.com Exp $ # # This file defines the directories and paths used by PCP # and is installed as the file /etc/pcp.conf for use at run-time. @@ -131,7 +131,7 @@ PCP_PS_ALL_FLAGS=@pcp_ps_all_flags@ # which -PCP_SH_WHICH=@which@ +PCP_WHICH_PROG=@which@ # host os PCP_PLATFORM=@target_os@ =========================================================================== mgmt/pcp/src/pmcd/rc-proc.sh =========================================================================== --- a/mgmt/pcp/src/pmcd/rc-proc.sh 2008-03-12 17:57:01.000000000 +1100 +++ b/mgmt/pcp/src/pmcd/rc-proc.sh 2008-03-12 17:07:08.985124897 +1100 @@ -2,7 +2,7 @@ # 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.14 2008/03/12 05:49:52 kimbrr Exp $ +# $Id: rc-proc.sh,v 1.13 2006/06/22 08:51:47 makc Exp $ # # source the PCP configuration environment variables @@ -30,11 +30,11 @@ [ -f $PCP_RC_DIR/$1 ] && _have_flag=true - if $PCP_SH_WHICH runlevel >/dev/null 2>&1 + if $PCP_WHICH_PROG runlevel >/dev/null 2>&1 then if [ "$PCP_PLATFORM" = solaris -o "$PCP_PLATFORM" = darwin ] then - if $PCP_SH_WHICH runlevel | grep "no runlevel" >/dev/null + if $PCP_WHICH_PROG runlevel | grep "no runlevel" >/dev/null then : else @@ -45,11 +45,11 @@ fi fi - if $PCP_SH_WHICH chkconfig >/dev/null 2>&1 + if $PCP_WHICH_PROG chkconfig >/dev/null 2>&1 then if [ "$PCP_PLATFORM" = solaris -o "$PCP_PLATFORM" = darwin ] then - if $PCP_SH_WHICH chkconfig | grep "no chkconfig" >/dev/null + if $PCP_WHICH_PROG chkconfig | grep "no chkconfig" >/dev/null then : else @@ -247,7 +247,7 @@ echo " To enable $_flag, run the following as root:" if $_have_chkconfig then - _cmd=`$PCP_SH_WHICH chkconfig` + _cmd=`$PCP_WHICH_PROG chkconfig` echo " # $_cmd $_flag on" else if [ -f /etc/debian_version ]; then