From b1be6267f0f52b1e06039bc4d213727ee80b5101 Mon Sep 17 00:00:00 2001 From: Daniel Joseph Barnhart Clark Date: Fri, 4 Aug 2006 19:37:34 +0000 Subject: * 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 --- encap/TODO | 33 ++++++++++++++++++--------------- encap/bcfg2-0.8.2.ep | 17 ++++++++++++++--- 2 files changed, 32 insertions(+), 18 deletions(-) (limited to 'encap') diff --git a/encap/TODO b/encap/TODO index 669bd044d..2e9502c98 100644 --- a/encap/TODO +++ b/encap/TODO @@ -1,17 +1,20 @@ - * daemontools: - * Test daemontools encap, including postinstall scripts for config - * Use daemontools to run the bcfg2 service on bootup (once) under the - encap packaging scheme - * Create bcfg2 "run" script (look at init scripts for other platforms) - * Modify Makefile, README, bcfg2-0.8.2.ep to work with daemontools + * daemontools: + * Test encap, including postinstall scripts for config + * Modify Makefile, README, bcfg2-0.8.2.ep to work with daemontools + * Create bcfg2 "run" scripts (look at init scripts for other platforms): + * Run bcfg2 server on bootup (configurable like debian, default off) + * Run bcfg2 client once on bootup (") + * Run bcfg2 client at specified interval (") - * ostiary: - * Test encap - * Create daemontools "run" script - * Integration with bcfg2 client + * ostiary: + * Test encap + * Create daemontools "run" script + * Make sure paths point to right places under /usr/local + * Modify Makefile, README, bcfg2-0.8.2.ep to work with ostiary + * Integration with bcfg2 client - * Announce to mailing list: - * daemontools & ostiary stuff - * encap support for Solaris (sparc and x86) - * Binary epkg archive at - http://www.pobox.com/users/dclark/mirror/bcfg2-encaps + * Announce to mailing list: + * daemontools & ostiary stuff + * encap support for Solaris (sparc and x86) + * Binary epkg archive at + http://www.pobox.com/users/dclark/mirror/bcfg2-encaps 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 ${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 ]]> -- cgit v1.2.3-1-g7c22