1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-06 13:18:07 +03:00
samba-mirror/ctdb/tests/UNIT
Martin Schwenke 9313731e96 ctdb-scripts: Update detect_init_style to use /etc/os-release
/etc/os-release is quite universal.  It can be found on most Linux
distros and on FreeBSD.

Attempt to use /etc/os-release to detect Red Hat, SUSE and Debian
based distros.  If /etc/os-release exists but distro is unknown then
$ID is printed as the detected distro, which will probably result in
sub-optimal behaviour, but when tracing it will at least indicate that
a new distro needs to be handled.

The only way to handle missing /etc/os-release is to set
CTDB_INIT_STYLE - see ctdb.sysconfig(5) for details.

The event script unit tests are updated to use /etc/os-release so
the new logic is exercised.

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>

Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Mon Oct 30 09:19:11 UTC 2023 on atb-devel-224
2023-10-30 09:19:11 +00:00
..
cunit ctdb-logging: Really make NOTICE the default debug level 2023-07-10 14:21:30 +00:00
eventd ctdb-tools: Fix CID 1539212 - signed/unsigned issue 2023-08-07 08:43:39 +00:00
eventscripts ctdb-scripts: Update detect_init_style to use /etc/os-release 2023-10-30 09:19:11 +00:00
onnode ctdb-tests: Prefix remaining environment variables with CTDB_ 2019-10-22 19:39:41 +00:00
shellcheck ctdb-tests: Run ShellCheck on event-script unit test support scripts 2023-07-05 12:16:56 +00:00
takeover ctdb: Add "home_nodes" file to deterministic IP allocation 2023-10-10 14:17:19 +00:00
takeover_helper ctdb-tests: Prefix remaining environment variables with CTDB_ 2019-10-22 19:39:41 +00:00
tool ctdb-tests: Add new tool unit tests to cover UNKNOWN state 2022-06-28 10:16:59 +00:00