Use only first part of host name

When replacing %m with the host name of the machine use only the part of
the host name up until the first dot.

Signed-off-by: Marcus Karlsson <mk@acc.umu.se>