[PATCH] ctdb-doc: Provide an example script for migrating old configuration (bug 13550)
Rowland Penny
rpenny at samba.org
Sat Jul 28 09:25:07 UTC 2018
On Sat, 28 Jul 2018 17:11:38 +1000
Martin Schwenke via samba-technical <samba-technical at lists.samba.org>
wrote:
> Include an example ctdbd.conf-style file for testing.
>
> CTDB in Samba 4.9 has a new style of configuration. This can help
> users migrate their configuration to the new style. This is an
> example, so is in doc/examples/. Distros might decide to use a
> variation of it.
>
> Please review and maybe push...
>
> peace & happiness,
> martin
You seem to use the same variable name in multiple functions, wouldn't
these be better declared as 'local' inside the functions ?
You also send the file path and name to each function, why not put
these inside the functions ? e.g.
local _out_file="${config_dir}/README.warn"
There is also this:
# Check if an option will convert to a ctdb.conf option
check_ctdb_conf_option ()
{
_opt="$1"
_out=$(get_ctdb_conf_option "$_opt" "")
[ -n "$_out" ]
}
I understand it up to the last line, is there something missing, such
as:
if [ -n "$_out" ]; then
return 0
else
return 1
fi
Rowland
More information about the samba-technical
mailing list