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.
Loading
Please register or sign in to comment