add get_[static/dynamic/pretty]hostname functionality
authorkremlin <ian@kremlin.cc>
Wed, 6 Aug 2014 06:57:12 +0000 (01:57 -0500)
committerkremlin <ian@kremlin.cc>
Wed, 6 Aug 2014 06:57:12 +0000 (01:57 -0500)
dynamic hostname (sometimes just hostname) is always whatever
the gethostname(3) returns.

static hostname is derived from prettyhostname, which attempts to
convert it to a 7 bit ascii hostname (no bookend -'s, etc.) if this
fails or prettyhostname has not yet been set, defaults to gethostname(3).

prettyhostname is whatever is in /etc/systemd_compat.conf, if reading that
fails it is just an empty string. prettyhostname is blank until manually set.


No differences found