[systemd-devel] hostnamectl reapplying the same hostname

Lennart Poettering lennart at poettering.net
Tue Jun 16 08:08:44 UTC 2020


On Mo, 25.05.20 16:19, Thomas HUMMEL (thomas.hummel at pasteur.fr) wrote:

> Hello,
>
> the point below has been buried at the end one of a previous thread. So feel
> free to ignore it if you find it irrelevant.
>
> With systemd-239 on linux 4.18.0 (CentOS 8.1), why does hostnamectl --static
> set-hostname <name> instantly sets the transient hostname to <name> *only*
> when <name> is not the current static hostname ?

There's a shortcut in place: if you change a hostname to what it is
already set to things are NOPs, and won't generate security incidents
and so on.

Lennart

--
Lennart Poettering, Berlin


More information about the systemd-devel mailing list