]> git.ipfire.org Git - thirdparty/systemd.git/commit
hostnamectl: allow trailing dot on fqdn
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 28 Jul 2015 02:30:06 +0000 (22:30 -0400)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 6 Aug 2015 00:49:21 +0000 (20:49 -0400)
commit17eb9a9ddba3f03fcba33445c1c1eedeb948da04
treeae0768463007ff944dc0e3bfb2def4e005ce0be3
parent79f17ea6f8d885da063f50d966891adaee236b26
hostnamectl: allow trailing dot on fqdn

When the user requests to set hostname, and we are setting both
pretty and static hostnames, and the name is a valid FQDN, we
use it as the static hostname, and unset the pretty hostname.
The change is that a FQDN with a trailing dot is accepted and ignored.

https://bugzilla.redhat.com/show_bug.cgi?id=1238246

Lowercasing of the static name is not done anymore.

$ hostnamectl set-hostname Foobar.
=> static is "Foobar", pretty is "Foobar."
$ hostnamectl set-hostname Foobar.org.
=> static is "Foobar.org", pretty is unset
$ hostnamectl set-hostname Foobar.org..
=> static is "Foobar.org", pretty is "Foobar.org.."
src/hostname/hostnamectl.c