pcp
[Top] [All Lists]

Re: [PATCH] installing pcp requires `which`

To: nscott@xxxxxxxxxx
Subject: Re: [PATCH] installing pcp requires `which`
From: Paul Jackson <pj@xxxxxxx>
Date: Wed, 12 Mar 2008 01:21:33 -0500
Cc: kimbrr@xxxxxxx, pcp@xxxxxxxxxxx
In-reply-to: <55812.192.168.3.1.1205300930.squirrel@xxxxxxxxxxxxxxx>
Organization: SGI
References: <Pine.SGI.4.58.0803121351200.93987974@xxxxxxxxxxxxxxxxxxxxxxx> <55812.192.168.3.1.1205300930.squirrel@xxxxxxxxxxxxxxx>
Sender: pcp-bounce@xxxxxxxxxxx
Does pcp.spec.in only use 'which' in the lines:

  if which chkconfig
  then
    chkconfig --add pcp

Is chkconfig always located at /sbin/chkconfig?

If so, then those tests could be changed to:

  if test -f /sbin/chkconfig
  then
    chkconfig --add pcp

Or, if that seems too risky, how about just always invoking chkconfig
in some harmless, sure to succeed, if chkconfig exists on the PATH at
all, fashion, and if that works, then proceed to make good use of it,
as in:

  if chkconfig -h >/dev/null 2>/dev/null
  then
    chkconfig --add pcp

-- 
                  I won't rest till it's the best ...
                  Programmer, Linux Scalability
                  Paul Jackson <pj@xxxxxxx> 1.940.382.4214

<Prev in Thread] Current Thread [Next in Thread>