1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-10 01:18:15 +03:00

ctdb-scripts: Add new function load_script_options()

For now this loads the global CTDB configuration too.  This will
change in the future after things are properly modularised.

This also anticipates a future change where event scripts end with a
".script" suffix.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
This commit is contained in:
Martin Schwenke 2018-02-19 13:13:26 +11:00 committed by Amitay Isaacs
parent e0c2b3a1e1
commit a2f8730c75

View File

@ -80,6 +80,17 @@ loadconfig() {
rewrite_ctdb_options
}
load_script_options ()
{
loadconfig
_options="${0%.script}.options"
if [ -r "$_options" ] ; then
. "$_options"
fi
}
##############################################################
die ()