nm-in-container: create conf.d file instead of modifying journald.conf

Currently, the Dockerfile expects /etc/systemd/journald.conf to exist on the base container,
but sometimes this may not be the case, for example on Fedora 40, which causes
the build process to fail if the host machine is also running Fedora 40.

Update the dockerfile to create a conf.d file instead, which has higher precedence.

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1972
This commit is contained in:
Jan Vaclav 2024-06-17 12:06:29 +02:00
parent 8924bfe18c
commit a5333f14b5

View File

@ -359,7 +359,8 @@ RUN chmod 700 /var/lib/NetworkManager
RUN echo -n "nm-in-container-secret-key" > /var/lib/NetworkManager/secret_key
RUN chmod 600 /var/lib/NetworkManager/secret_key
RUN sed 's/.*RateLimitBurst=.*/RateLimitBurst=0/' /etc/systemd/journald.conf -i
RUN mkdir -p /etc/systemd/journald.conf.d/ && \
echo "RateLimitBurst=0" > /etc/systemd/journald.conf.d/no-rate-limit.conf
$RUN_LN_BASEDIR_NM
$RUN_LN_SYMLINK_CMDS