[lxc/lxc] c7bd5a: Enable systemd to create /var/lib/lxc at runtime w...

1 view
Skip to first unread message

Stéphane Graber

unread,
Sep 18, 2025, 10:33:35 AMSep 18
to lxc-...@lists.linuxcontainers.org
Branch: refs/heads/main
Home: https://github.com/lxc/lxc
Commit: c7bd5a3576f7449040e2164b6740c94cc2f5940c
https://github.com/lxc/lxc/commit/c7bd5a3576f7449040e2164b6740c94cc2f5940c
Author: Vishwas Udupa <vud...@qti.qualcomm.com>
Date: 2025-09-17 (Wed, 17 Sep 2025)

Changed paths:
M config/init/systemd/lxc.service.in
M config/init/systemd/lxc@.service.in

Log Message:
-----------
Enable systemd to create /var/lib/lxc at runtime with StateDirectory

This change adds the StateDirectory= directive in the systemd
unit file to ensure that the /var/lib/lxc directory is
automatically created and managed by systemd during service startup.

The StateDirectory= option instructs systemd to create a persistent
state directory under /var/lib/. This is particularly useful in
scenarios where the directory may be missing at first boot — such as
on OSTree-based Linux distributions, which typically ship with
empty /var directory as part of their immutable root filesystem.

By adding StateDirectory=lxc, systemd will handle the creation of
/var/lib/lxc on first boot, ensuring that the service can start
reliably even when the directory is not present initially.

Signed-off-by: Vishwas Udupa <vud...@qti.qualcomm.com>
Co-developed-by: Raghuvarya S <ragh...@qti.qualcomm.com>


Commit: b08632163d18271da7d30556b44b7ca6438647e6
https://github.com/lxc/lxc/commit/b08632163d18271da7d30556b44b7ca6438647e6
Author: Stéphane Graber <stgr...@stgraber.org>
Date: 2025-09-18 (Thu, 18 Sep 2025)

Changed paths:
M config/init/systemd/lxc.service.in
M config/init/systemd/lxc@.service.in

Log Message:
-----------
Merge pull request #4583 from vishwasudupa/main

Enable systemd to create /var/lib/lxc at runtime with StateDirectory


Compare: https://github.com/lxc/lxc/compare/df8cf80e960e...b08632163d18

To unsubscribe from these emails, change your notification settings at https://github.com/lxc/lxc/settings/notifications
Reply all
Reply to author
Forward
0 new messages