------------------------------------------------------------
revno: 458
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Andrew Tridgell <[EMAIL PROTECTED]>
branch nick: tridge
timestamp: Mon 2007-06-04 20:05:31 +1000
message:
allow setting of variables at startup in config file
modified:
config/ctdb.sysconfig
ctdb.sysconfig-20070527204758-biuh7znabuwan3zn-7
config/events events-20070529030121-04fjh63cxfh8v1pj-1
=== modified file 'config/ctdb.sysconfig'
--- a/config/ctdb.sysconfig 2007-06-04 05:44:52 +0000
+++ b/config/ctdb.sysconfig 2007-06-04 10:05:31 +0000
@@ -51,6 +51,14 @@
# the default is 0
# CTDB_DEBUGLEVEL=0
+# set any default tuning options for ctdb
+# use CTDB_SET_XXXX=value where XXXX is the name of the tuning
+# variable
+# for example
+# CTDB_SET_TRAVERSETIMEOUT=60
+# you can get a list of variables using "ctdb listvars"
+
+
# any other options you might want. Run ctdbd --help for a list
# CTDB_OPTIONS=
=== modified file 'config/events'
--- a/config/events 2007-06-04 05:09:03 +0000
+++ b/config/events 2007-06-04 10:05:31 +0000
@@ -21,6 +21,15 @@
# make sure we have a blank state directory for the scripts to work
with
/bin/rm -rf /etc/ctdb/state
/bin/mkdir -p /etc/ctdb/state
+
+ # set any tunables from the config file
+ set | grep ^CTDB_SET_ | cut -d_ -f3- |
+ while read v; do
+ varname=`echo $v | cut -d= -f1`
+ value=`echo $v | cut -d= -f2`
+ ctdb setvar $varname $value || exit 1
+ echo "`date` Set $varname to $value"
+ done
;;
esac