]> git.ipfire.org Git - thirdparty/dracut.git/commit
network-manager: set kernel hostname from the command line
authorBeniamino Galvani <bgalvani@redhat.com>
Thu, 7 May 2020 05:48:12 +0000 (07:48 +0200)
committerHarald Hoyer <harald@hoyer.xyz>
Fri, 29 May 2020 12:42:42 +0000 (14:42 +0200)
commiteb770a4a207b2e9e3080068c1df22b69ed44d4b5
tree9bce81c92ba1f97845b7fb61d7a442f33c74d074
parent7169e5f0e43cdc9a0bdc93de33f3404d8c461acd
network-manager: set kernel hostname from the command line

Since commit ff70adf873ef ("initrd: save hostname to a file in /run"),
the initrd generator of NetworkManager parses the hostname from 'ip='
options of the kernel command line and writes it to
/run/NetworkManager/initrd/hostname.

When that file exists, set the kernel hostname.

In presence of multiple hostnames in the command line, the last one
wins. Hostnames from command line always have precedence over ones
received through DHCP. This is a bit different from the legacy network
module that gives higher precedence to the hostname (from DHCP or
command line) of the last interface that is brought up, which depends
on the udev order.
modules.d/35network-manager/nm-run.sh