printing: Avoid zombies in the background daemon
[Samba.git] / ctdb / failover / failover_conf.c
blob0f199cbcd6cc2c0a50cc805a68e139032f375f4a
1 /*
2 CTDB database config handling
4 Copyright (C) Martin Schwenke 2018
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, see <http://www.gnu.org/licenses/>.
20 #include "replace.h"
22 #include "lib/util/debug.h"
24 #include "common/conf.h"
26 #include "failover/failover_conf.h"
28 static bool check_static_boolean_change(const char *key,
29 bool old_value,
30 bool new_value,
31 enum conf_update_mode mode)
33 if (mode == CONF_MODE_RELOAD || CONF_MODE_API) {
34 if (old_value != new_value) {
35 D_WARNING("Ignoring update of [%s] -> %s\n",
36 FAILOVER_CONF_SECTION,
37 key);
41 return true;
44 void failover_conf_init(struct conf_context *conf)
46 conf_define_section(conf, FAILOVER_CONF_SECTION, NULL);
48 conf_define_boolean(conf,
49 FAILOVER_CONF_SECTION,
50 FAILOVER_CONF_DISABLED,
51 false,
52 check_static_boolean_change);