From: Michael Prokop Date: Tue, 2 Feb 2010 14:16:04 +0000 (+0100) Subject: Bootoption hostname: use grml-hostname to adjust configuration files on the fly. X-Git-Tag: v0.9.5^0 X-Git-Url: http://git.grml.org/?p=grml-autoconfig.git;a=commitdiff_plain;h=34be1a5b46d770b134219692d080aa7f82070c09 Bootoption hostname: use grml-hostname to adjust configuration files on the fly. --- diff --git a/autoconfig.functions b/autoconfig.functions index c61cb6c..3cc12ee 100755 --- a/autoconfig.functions +++ b/autoconfig.functions @@ -354,8 +354,9 @@ config_hostname(){ if checkbootparam 'hostname' ; then HOSTNAME="$(getbootparam 'hostname' 2>>$DEBUG)" einfo "Setting hostname to $HOSTNAME as requested." - sed -i "s/^127.0.0.1.*localhost/127.0.0.1 $HOSTNAME localhost/" /etc/hosts - hostname $HOSTNAME ; eend $? + grml-hostname $HOSTNAME >>$DEBUG ; RC=$? + [ "$RC" = "0" ] && hostname $HOSTNAME + eend $RC else hostname --file /etc/hostname fi diff --git a/debian/changelog b/debian/changelog index d3b4d6c..93ebd79 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +grml-autoconfig (0.9.5) unstable; urgency=low + + * Bootoption hostname: use grml-hostname to adjust configuration + files on the fly. [Closes: gf-issue33] + + -- Michael Prokop Tue, 02 Feb 2010 14:33:09 +0100 + grml-autoconfig (0.9.4) unstable; urgency=low * If there's no lang=... bootoption present default to lang=en (except