Hi,
I'm tossing up whether/not to merge something like the patch below.
Can you see any downsides (or potential breakage) in this?
Obviously, it removes the requirement to explictly cd to the PMDAs
directory before running the script. Makes life easier when doing
remote installs, etc.
diff --git a/src/pmcd/pmdaproc.sh b/src/pmcd/pmdaproc.sh
index 0ad5afd..39816a7 100644
--- a/src/pmcd/pmdaproc.sh
+++ b/src/pmcd/pmdaproc.sh
@@ -812,9 +812,8 @@ _setup()
dso_entry=${iam}_init
pmda_dir=`__strip_pcp_dir "${PCP_PMDAS_DIR}/${iam}"`
- # check the user is root
- #
_check_userroot
+ _check_directory
# automatically generate files for those lazy Perl programmers
#
@@ -1235,6 +1234,13 @@ _check_userroot()
fi
}
+_check_directory()
+{
+ __pmdadir="${PCP_PMDAS_DIR}/${iam}"
+ test -d "$__pmdadir" && cd "$__pmdadir"
+ __here=`pwd`
+}
+
# preferred public interfaces
#
pmdaSetup()
--
Nathan
|