diff options
author | Daniel Joseph Barnhart Clark <dclark@pobox.com> | 2006-08-04 19:37:34 +0000 |
---|---|---|
committer | Daniel Joseph Barnhart Clark <dclark@pobox.com> | 2006-08-04 19:37:34 +0000 |
commit | b1be6267f0f52b1e06039bc4d213727ee80b5101 (patch) | |
tree | f898f933b32b4a95559e74d9cc0ad61198dde7b8 /encap/bcfg2-0.8.2.ep | |
parent | f9f4f63fc33049308eab7853c0996f19164a68a7 (diff) | |
download | bcfg2-b1be6267f0f52b1e06039bc4d213727ee80b5101.tar.gz bcfg2-b1be6267f0f52b1e06039bc4d213727ee80b5101.tar.bz2 bcfg2-b1be6267f0f52b1e06039bc4d213727ee80b5101.zip |
* Fixed bug where postinstall script running for second time during
installs from binary distribution encap would mess up paths (like
/usr/local/usr/local/bcfg2.conf)
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@2043 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'encap/bcfg2-0.8.2.ep')
-rw-r--r-- | encap/bcfg2-0.8.2.ep | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/encap/bcfg2-0.8.2.ep b/encap/bcfg2-0.8.2.ep index 37e94d692..e2dbfc135 100644 --- a/encap/bcfg2-0.8.2.ep +++ b/encap/bcfg2-0.8.2.ep @@ -247,7 +247,6 @@ if __name__ == '__main__': #!/bin/sh # This fixes paths for the bcfg2 encap packaging. -# Do not run more than once; it does not converge. BASEDIR="`echo ${0} | xargs -n1 dirname`" REGEXPLACE="${BASEDIR}/b2-regexplace.py" @@ -270,6 +269,13 @@ for FILE in ${COMPILEALL}; do fi done +# Do not run more than once; it does not converge. +# (/usr/local/usr/local/bcfg2.conf bug) +if [ "${1}x" != "firstx" ]; then + printf "\nb2-regexplace.sh: Already ran\n\t${BASEDIR}/b2-regexplace.sh, not running again...\n" + exit 0 +fi + printf "\nRemoving bcfg2 .pyc files...\n" find ${BASEDIR} -type f | grep "\.pyc$" | xargs -n1 rm @@ -310,8 +316,13 @@ exit 0 <include_file name="postinstall" mode="0755"><![CDATA[ #!/bin/sh BASEDIR="`echo ${0} | xargs -n1 dirname`" -test -x ${BASEDIR}/b2-regexplace.sh || exit 1 -${BASEDIR}/b2-regexplace.sh > ${BASEDIR}/postinstall.log 2>&1 3>&1 + +if [ ! -e ${BASEDIR}/postinstall.log ]; then + test -x ${BASEDIR}/b2-regexplace.sh || exit 1 + ${BASEDIR}/b2-regexplace.sh first > ${BASEDIR}/postinstall.log 2>&1 3>&1 +else + printf "\npostinstall: already ran\n\t${BASEDIR}/b2-regexplace.sh, not running again...\n" >> ${BASEDIR}/postinstall.log +fi ]]></include_file> |