grml-hostname: improve regex for hostname matching [Closes: issue1005]
authorMichael Prokop <mika@grml.org>
Thu, 12 Jan 2012 23:58:34 +0000 (00:58 +0100)
committerMichael Prokop <mika@grml.org>
Thu, 12 Jan 2012 23:58:34 +0000 (00:58 +0100)
commit3ea7b7562e8e55bc5a1d81b561d494266e5f9845
tree29ffdb6e04fee9873db7961ce9c82effb0ebf377
parent8ca48f1cd1dcb3e1398816cd2a52627dd3fb410f
grml-hostname: improve regex for hostname matching [Closes: issue1005]

Do not trust on output of hostname(1) as this might not
necessarily be what's used inside /etc/hosts. This
is supposed to work on Grml systems as well as on Debian.

While at it also use same formating WRT whitespace chars
when replacing the localhost line(s).
usr_sbin/grml-hostname