We have had a longstanding puzzle as to why, when a whole-machine image
that includes pcp is constructed in a chroot, pcp is chkconfig off when
the image comes to be used. Turns out to be due to which not being
available in the rpm post-install ops in the chroot.
Investigation suggests that using which from bash can be unsafe even
when its available, so the best solution seems to be to use type instead
in these cases. Here I simply say, use type if sh -c 'type -p sh'
succeeds (I think this makes sense for linux/bash); otherwise use which
There are other uses of which elsewhere that can be switched over to
also use $PCP_WHICH_PROG should it ever turn out that there are any real
systems that dont install which, or if there are problems caused
by which using a different PATH to that used by bash. The current
priority was just to catch those uses that occur during install.
[PATCH] installing pcp requires
which
We have had a longstanding puzzle as to why, when a whole-machine image
that includes pcp is constructed in a chroot, pcp is chkconfig off when
the image comes to be used. Turns out to be due to
which
not beingavailable in the rpm post-install ops in the chroot.
Investigation suggests that using
which
from bash can be unsafe evenwhen its available, so the best solution seems to be to use
type
insteadin these cases. Here I simply say, use
type
ifsh -c 'type -p sh'
succeeds (I think this makes sense for linux/bash); otherwise use which
There are other uses of
which
elsewhere that can be switched over toalso use $PCP_WHICH_PROG should it ever turn out that there are any real
systems that dont install
which
, or if there are problems causedby
which
using a different PATH to that used by bash. The currentpriority was just to catch those uses that occur during install.