diff options
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> |