Skip to content
Commit d7f4ad20 authored by Lennart Poettering's avatar Lennart Poettering
Browse files

hostnamed: minimize caching of /etc/hostname, /etc/os-release and /etc/machine-info

Instead of reading these files at startup and never again, let's read
them when we need them. As an optimization (in particular as some of
these files contain the data for many fields at once) let's cache the
results as long as the stat data (i.e. mtime) remains stable.

Also, while we are at it, if we can't read any of these props, let's not
fail everything, but continue without the data.
parent aa994368
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment