HomeClusterLabs Projects

exec: Add support for env STATE_DIRECTORY

Description

exec: Add support for env STATE_DIRECTORY

Image mode recommendation is to not ship /var/lib subdirectories if
possible and bootc lint produces warning if not. This was the case
also for Corosync.

Simplest possible solution seems to implement support for systemd
unit StateDirectory functionality and not ship /var/lib/corosync
in rpm.

So patch:

  1. Adds support for reading the environment variable STATE_DIRECTORY which is set by systemd and use it as a default value for system.state_dir configuration option. This is generally useful feature even for non-systemd builds.
  2. Set StateDirectory in service file
  3. Drop /var/lib/corosync directory from RPM for systemd builds

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>

Details

Provenance
jfriesseAuthored on Wed, Jun 11, 11:26 AM
Parents
rC919d67de61f6: config: Cleanup dropped options
Branches
Unknown
Tags
Unknown