Files
ports/net/py-lib389/files/patch-lib389_instance_setup.py
T
Jochen Neumeister d10cb9f392 net/py-lib389: Add new port
lib389 provides the Python library and command-line administration
tools for 389 Directory Server.

It includes tools for creating and managing Directory Server
instances, configuring servers, and managing directory entries.

This port is required for the development of net/freeipa-server.

WWW: https://www.port389.org/

Sponsored by:	Netzkommune GmbH
2026-06-29 22:27:24 +02:00

17 lines
1.0 KiB
Python

--- lib389/instance/setup.py.orig 2026-06-29 17:03:20 UTC
+++ lib389/instance/setup.py
@@ -826,10 +826,10 @@ class SetupDs(object):
# which subsequently breaks containers starting as instance.start then believes
# it COULD check the ds status. The times we need to check for systemd are mainly
# in other environments that use systemd natively in their containers.
- container_result = 1
- if not self.containerised:
+ container_result = None
+ if not self.containerised and shutil.which("systemd-detect-virt"):
container_result = subprocess.run(["systemd-detect-virt", "-c"], stdout=subprocess.PIPE)
- if self.containerised or container_result.returncode == 0:
+ if self.containerised or (container_result is not None and container_result.returncode == 0):
# In a container, set the db_home_dir to the db path
self.log.debug("Container detected setting db home directory to db directory.")
slapd['db_home_dir'] = slapd['db_dir']