Bootoption hostname: use grml-hostname to adjust configuration files on the fly. v0.9.5
authorMichael Prokop <mika@grml.org>
Tue, 2 Feb 2010 14:16:04 +0000 (15:16 +0100)
committerMichael Prokop <mika@grml.org>
Tue, 2 Feb 2010 14:16:04 +0000 (15:16 +0100)
autoconfig.functions
debian/changelog

index c61cb6c..3cc12ee 100755 (executable)
@@ -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
index d3b4d6c..93ebd79 100644 (file)
@@ -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 <mika@grml.org>  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