pump hostname script: run in live mode only and use grml-hostname; update changelog v0.8.34
authorMichael Prokop <mika@grml.org>
Sat, 17 Oct 2009 11:46:35 +0000 (13:46 +0200)
committerMichael Prokop <mika@grml.org>
Sat, 17 Oct 2009 13:15:44 +0000 (15:15 +0200)
debian/changelog
etc/grml/pump-scripts.d/set-hostname

index a4a347d..cd348ff 100644 (file)
@@ -1,3 +1,24 @@
+grml-autoconfig (0.8.34) unstable; urgency=low
+
+  [ Ulrich Dangel ]
+  * Integrate patch by Andreas Thienemann <andreas@bawue.net> (thanks!):
+    Add a dhcphostname option to grml which will set the hostname of the
+    booted system according to the dns information.
+    This Patch implements support for the non-netboot cases by adding
+    an appropriate script to be called by pump.
+
+  * Reworked and grmlfied patch from Andreas Thienemann:
+    Introduced etc/grml/pump-scripts.d, added wrapper script
+    /usr/lib/grml-autoconfig/pump-runparts, modified set-hostname to use
+    checkbootparam and run it per default (disable via 'nodhcphostname').
+
+  [ Michael Prokop ]
+  * Make sure the hostname script is executed only in live mode and
+    uses grml-hostname for adjusting /etc/hosts as well.
+    [Closes: issue679]
+
+ -- Michael Prokop <mika@grml.org>  Sat, 17 Oct 2009 14:58:28 +0200
+
 grml-autoconfig (0.8.33) unstable; urgency=low
 
   [ Ulrich Dangel ]
index 9c2c518..f4b46d1 100755 (executable)
@@ -9,16 +9,16 @@
 
 . /etc/grml/autoconfig.functions
 
-
 # only run if no nodhcphostname parameter is given
-if ! checkbootparam 'nodhcphostname' ; then
+# and if running in live mode
+if ! checkbootparam 'nodhcphostname' && [ -f /etc/grml_cd ] ; then
 
     hostname=$(host $3) || exit 1
     # dhcphostname is set, get the PTR for the ip
     hostname=$(echo ${hostname} | awk '{ print substr($5, 0, length($5)-1) }')
 
     if [ -n "$hostname" ] ; then
-        echo $hostname > /etc/hostname
+        grml-hostname $hostname
         hostname -F /etc/hostname
     fi
 fi