From 34be1a5b46d770b134219692d080aa7f82070c09 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Tue, 2 Feb 2010 15:16:04 +0100 Subject: [PATCH] Bootoption hostname: use grml-hostname to adjust configuration files on the fly. --- autoconfig.functions | 5 +++-- debian/changelog | 7 +++++++ 2 files changed, 10 insertions(+), 2 deletions(-) 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 -- 2.1.4