summaryrefslogtreecommitdiffstats
path: root/encap/src/bcfg2-site/bcfg2-site-RENAME
diff options
context:
space:
mode:
authorDaniel Joseph Barnhart Clark <dclark@pobox.com>2006-08-24 03:21:17 +0000
committerDaniel Joseph Barnhart Clark <dclark@pobox.com>2006-08-24 03:21:17 +0000
commit144f1344adf60815c8c57e93b5ed0acf98bbc40f (patch)
treef9035e2b49da8139e99cc858ea1d2939f8a9cdc0 /encap/src/bcfg2-site/bcfg2-site-RENAME
parent12b22256f2430dbdbb59a6119eb7732ba942fca1 (diff)
downloadbcfg2-144f1344adf60815c8c57e93b5ed0acf98bbc40f.tar.gz
bcfg2-144f1344adf60815c8c57e93b5ed0acf98bbc40f.tar.bz2
bcfg2-144f1344adf60815c8c57e93b5ed0acf98bbc40f.zip
EncapPackages: A bunch of changes, including but not limited to:
* Cleaner directory structure * Numerous Makefile improvements * Makefile no longer tied to specific versions of encap packages (except in the case of python-apt, which is distro-specific) * Automatic dependancy generation from encap package files * bcfg2-site pretty much done git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@2103 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'encap/src/bcfg2-site/bcfg2-site-RENAME')
-rw-r--r--encap/src/bcfg2-site/bcfg2-site-RENAME/encapinfo.tmpl2
-rw-r--r--encap/src/bcfg2-site/bcfg2-site-RENAME/etc/default/bcfg2-client/.SENTINEL_SITE0
-rw-r--r--encap/src/bcfg2-site/bcfg2-site-RENAME/etc/default/bcfg2-server/.SENTINEL_SITE0
-rwxr-xr-xencap/src/bcfg2-site/bcfg2-site-RENAME/mkinstalldirs32
-rwxr-xr-xencap/src/bcfg2-site/bcfg2-site-RENAME/postinstall81
-rwxr-xr-xencap/src/bcfg2-site/bcfg2-site-RENAME/preinstall0
6 files changed, 115 insertions, 0 deletions
diff --git a/encap/src/bcfg2-site/bcfg2-site-RENAME/encapinfo.tmpl b/encap/src/bcfg2-site/bcfg2-site-RENAME/encapinfo.tmpl
index e6af738ac..f54cb1e18 100644
--- a/encap/src/bcfg2-site/bcfg2-site-RENAME/encapinfo.tmpl
+++ b/encap/src/bcfg2-site/bcfg2-site-RENAME/encapinfo.tmpl
@@ -7,3 +7,5 @@ description bcfg2-site-${SITE_SHORTNAME} - bcfg2 configuration for ${SITE_NAME}
prereq pkgspec >= bcfg2-0.8.2
prereq pkgspec >= daemontools-0.76
prereq pkgspec >= ostiary-3.4
+exclude etc
+exclude sbin
diff --git a/encap/src/bcfg2-site/bcfg2-site-RENAME/etc/default/bcfg2-client/.SENTINEL_SITE b/encap/src/bcfg2-site/bcfg2-site-RENAME/etc/default/bcfg2-client/.SENTINEL_SITE
deleted file mode 100644
index e69de29bb..000000000
--- a/encap/src/bcfg2-site/bcfg2-site-RENAME/etc/default/bcfg2-client/.SENTINEL_SITE
+++ /dev/null
diff --git a/encap/src/bcfg2-site/bcfg2-site-RENAME/etc/default/bcfg2-server/.SENTINEL_SITE b/encap/src/bcfg2-site/bcfg2-site-RENAME/etc/default/bcfg2-server/.SENTINEL_SITE
deleted file mode 100644
index e69de29bb..000000000
--- a/encap/src/bcfg2-site/bcfg2-site-RENAME/etc/default/bcfg2-server/.SENTINEL_SITE
+++ /dev/null
diff --git a/encap/src/bcfg2-site/bcfg2-site-RENAME/mkinstalldirs b/encap/src/bcfg2-site/bcfg2-site-RENAME/mkinstalldirs
new file mode 100755
index 000000000..0801ec2c9
--- /dev/null
+++ b/encap/src/bcfg2-site/bcfg2-site-RENAME/mkinstalldirs
@@ -0,0 +1,32 @@
+#! /bin/sh
+# mkinstalldirs --- make directory hierarchy
+# Author: Noah Friedman <friedman@prep.ai.mit.edu>
+# Created: 1993-05-16
+# Last modified: 1994-03-25
+# Public domain
+
+errstatus=0
+
+for file in ${1+"$@"} ; do
+ set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
+ shift
+
+ pathcomp=
+ for d in ${1+"$@"} ; do
+ pathcomp="$pathcomp$d"
+ case "$pathcomp" in
+ -* ) pathcomp=./$pathcomp ;;
+ esac
+
+ if test ! -d "$pathcomp"; then
+ echo "mkdir $pathcomp" 1>&2
+ mkdir "$pathcomp" || errstatus=$?
+ fi
+
+ pathcomp="$pathcomp/"
+ done
+done
+
+exit $errstatus
+
+# mkinstalldirs ends here
diff --git a/encap/src/bcfg2-site/bcfg2-site-RENAME/postinstall b/encap/src/bcfg2-site/bcfg2-site-RENAME/postinstall
index e69de29bb..4ed875e4c 100755
--- a/encap/src/bcfg2-site/bcfg2-site-RENAME/postinstall
+++ b/encap/src/bcfg2-site/bcfg2-site-RENAME/postinstall
@@ -0,0 +1,81 @@
+#!/bin/sh -e
+
+umask 002
+BASEDIR="${ENCAP_TARGET}" # Usually /usr/local
+PKGDIR="${ENCAP_SOURCE}/${ENCAP_PKGNAME}" # Ususally /usr/local/encap/<pkgname>
+LOG="${PKGDIR}/postinstall.log"
+MKINSTALLDIRS="${PKGDIR}/mkinstalldirs"
+exec > $LOG 2>&1
+
+printf "Running ${ENCAP_PKGNAME} postinstall script...\n"
+date
+
+chmod 755 ${MKINSTALLDIRS}
+${MKINSTALLDIRS} "${BASEDIR}/etc/default/bcfg2-client/env"
+${MKINSTALLDIRS} "${BASEDIR}/etc/default/bcfg2-server/env"
+${MKINSTALLDIRS} "${BASEDIR}/sbin"
+
+rmcp() {
+ SRCFILENAME="`basename ${1}`"
+ if [ -d "${2}" ]; then
+ DESTDIRNAME="$2"
+ else
+ DESTDIRNAME="`dirname ${2}`"
+ fi
+ TARGETNAME="$DESTDIRNAME/$SRCFILENAME"
+ if [ -h "$TARGETNAME" ]; then rm "$TARGETNAME"; fi
+ if [ -f "$TARGETNAME" ]; then rm "$TARGETNAME"; fi
+ cp "$1" "$2"
+}
+
+if [ -f ${BASEDIR}/etc/default/bcfg2-client/.SENTINEL_BCFG2 ]; then
+ printf "INFO: bcfg2 client options have been updated by bcfg2 -\n"
+ printf "INFO: not replacing that configuration.\n"
+elif [ -f ${BASEDIR}/etc/default/bcfg2-client/.SENTINEL_SITE ]; then
+ printf "INFO: bcfg2 client options have been previously updated -\n"
+ printf "INFO: not replacing that configuration.\n"
+else
+ DIR="etc/default/bcfg2-client"
+ rmcp $PKGDIR/$DIR/env/RUN_INTERVAL_SECONDS ${BASEDIR}/$DIR/env/
+ rmcp $PKGDIR/$DIR/env/OPTIONS ${BASEDIR}/$DIR/env/
+ touch ${BASEDIR}/$DIR/.SENTINEL_SITE
+fi
+
+if [ -f ${BASEDIR}/etc/default/bcfg2-server/.SENTINEL_BCFG2 ]; then
+ printf "INFO: bcfg2 server options have been updated by bcfg2 -\n"
+ printf "INFO: not replacing that configuration.\n"
+elif [ -f ${BASEDIR}/etc/default/bcfg2-server/.SENTINEL_SITE ]; then
+ printf "INFO: bcfg2 server options have been previously updated -\n"
+ printf "INFO: not replacing that configuration.\n"
+else
+ DIR="etc/default/bcfg2-server"
+ rmcp $PKGDIR/$DIR/env/OPTIONS ${BASEDIR}/$DIR/env/
+ touch ${BASEDIR}/$DIR/.SENTINEL_SITE
+fi
+
+if [ -f ${BASEDIR}/etc/.SENTINEL_BCFG2 ]; then
+ printf "INFO: bcfg2.conf and/or ostiary.cfg may have been updated by\n"
+ printf "INFO: bcfg2 - not replacing that configuration.\n"
+elif [ -f ${BASEDIR}/etc/.SENTINEL_SITE ]; then
+ printf "INFO: bcfg2.conf and/or ostiary.cfg may have been previously\n"
+ printf "INFO: updated - not replacing that configuration.\n"
+else
+ rmcp $PKGDIR/etc/bcfg2.conf ${BASEDIR}/etc/
+ rmcp $PKGDIR/etc/ostiary.cfg ${BASEDIR}/etc/
+ touch ${BASEDIR}/etc/.SENTINEL_SITE
+fi
+
+if [ -f ${BASEDIR}/sbin/.SENTINEL_BCFG2 ]; then
+ printf "INFO: ost-bcfg2.sh may have been updated by bcfg2 -\n"
+ printf "INFO: not replacing that configuration with this script.\n"
+elif [ -f ${BASEDIR}/sbin/.SENTINEL_SITE ]; then
+ printf "INFO: ost-bcfg2.sh may have been previously updated -\n"
+ printf "INFO: not replacing that configuration with this script.\n"
+else
+ rmcp $PKGDIR/sbin/ost-bcfg2.sh ${BASEDIR}/sbin/
+ touch ${BASEDIR}/sbin/.SENTINEL_SITE
+fi
+
+printf "Finished ${ENCAP_PKGNAME} postinstall script.\n"
+
+exit 0
diff --git a/encap/src/bcfg2-site/bcfg2-site-RENAME/preinstall b/encap/src/bcfg2-site/bcfg2-site-RENAME/preinstall
deleted file mode 100755
index e69de29bb..000000000
--- a/encap/src/bcfg2-site/bcfg2-site-RENAME/preinstall
+++ /dev/null