chiark / gitweb /
hostnamectl: if somebody invokes 'hostnamectl set-hostname' with a valid internet...
authorLennart Poettering <lennart@poettering.net>
Wed, 3 Apr 2013 20:06:16 +0000 (22:06 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 3 Apr 2013 20:06:16 +0000 (22:06 +0200)
commitfda2c5d28bdf5c6ac1ff1ba504fa884c48ed1439
treeb02308c1d26a916ec64855d4be77cbec1608f2bc
parentfec6fc6baeca4d306cc70a61a08aef7b69da0172
hostnamectl: if somebody invokes 'hostnamectl set-hostname' with a valid internet hostname unset the pretty name

If people are unaware or uninterested in the concept of pretty host
names, and simply invoke "hostnamectl set-hostname" for a valid internet
host name, then use this as indication to unset the pretty host name and
only set the static/dynamic one.

This also allows fqdn, hence "hostnamectl set-hostname www.foobar.com"
will just work if people really insist on using fqdns as hostnames.
src/hostname/hostnamectl.c
src/hostname/hostnamed.c