summaryrefslogtreecommitdiffstats
path: root/encap/src/bcfg2-site
diff options
context:
space:
mode:
authorDaniel Joseph Barnhart Clark <dclark@pobox.com>2006-08-25 06:12:43 +0000
committerDaniel Joseph Barnhart Clark <dclark@pobox.com>2006-08-25 06:12:43 +0000
commit2e0d46f2539189e8773f4827c20548bd275e2529 (patch)
treecead071c477cc79b47361c099abb57d276db97e7 /encap/src/bcfg2-site
parent7d04c19afa0f690a3123fc5a7c929a4675b37b84 (diff)
downloadbcfg2-2e0d46f2539189e8773f4827c20548bd275e2529.tar.gz
bcfg2-2e0d46f2539189e8773f4827c20548bd275e2529.tar.bz2
bcfg2-2e0d46f2539189e8773f4827c20548bd275e2529.zip
EncapPackages: Add bcfg2-client "daemon" start to bcfg2-site
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@2108 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'encap/src/bcfg2-site')
-rwxr-xr-xencap/src/bcfg2-site/bcfg2-site-RENAME/postinstall.tmpl (renamed from encap/src/bcfg2-site/bcfg2-site-RENAME/postinstall)18
-rw-r--r--encap/src/bcfg2-site/site-settings.conf-example1
2 files changed, 19 insertions, 0 deletions
diff --git a/encap/src/bcfg2-site/bcfg2-site-RENAME/postinstall b/encap/src/bcfg2-site/bcfg2-site-RENAME/postinstall.tmpl
index 4ed875e4c..a02c265cb 100755
--- a/encap/src/bcfg2-site/bcfg2-site-RENAME/postinstall
+++ b/encap/src/bcfg2-site/bcfg2-site-RENAME/postinstall.tmpl
@@ -1,3 +1,8 @@
+#include "site-settings.conf"
+#compiler-settings
+cheetahVarStartToken = @
+commentStartToken = //
+#end compiler-settings
#!/bin/sh -e
umask 002
@@ -76,6 +81,19 @@ else
touch ${BASEDIR}/sbin/.SENTINEL_SITE
fi
+//if int(@BCFG2_CLIENT_RUN_INTERVAL_SECONDS) > 0
+if [ ! -h /service/bcfg2-client ]; then
+ if [ -d /usr/local/var/svc.d/bcfg2-client ]; then
+ ln -s /usr/local/var/svc.d/bcfg2-client /service/bcfg2-client
+ else
+ printf "ERROR: /usr/local/var/svc.d/bcfg2-client does not exist.\n"
+ exit 1
+ fi
+else
+ printf "INFO: /service/bcfg2-client already exists, not replacing...\n"
+fi
+//end if
+
printf "Finished ${ENCAP_PKGNAME} postinstall script.\n"
exit 0
diff --git a/encap/src/bcfg2-site/site-settings.conf-example b/encap/src/bcfg2-site/site-settings.conf-example
index c29ab36e2..dd7b0425e 100644
--- a/encap/src/bcfg2-site/site-settings.conf-example
+++ b/encap/src/bcfg2-site/site-settings.conf-example
@@ -18,6 +18,7 @@
#set global $BCFG2_SERVER = "config.localdomain.com"
#set global $BCFG2_PORT = "6"
#set global $OSTIARY_PORT = "7"
+## How often to run the bcfg2 client, or "0" to disable
#set global $BCFG2_CLIENT_RUN_INTERVAL_SECONDS = "3600"
## Initial options for bcfg(1). The bcfg2 client is started with these options
## on installation and periodically based on BCFG2_CLIENT_RUN_INTERVAL_SECONDS,