Set hostname in instsoft-hook already
authorMichael Prokop <mika@grml.org>
Mon, 12 Nov 2007 10:58:16 +0000 (11:58 +0100)
committerMichael Prokop <mika@grml.org>
Mon, 12 Nov 2007 10:58:16 +0000 (11:58 +0100)
debian/changelog
etc/grml/fai/config/hooks/instsoft.GRMLBASE
etc/grml/fai/config/scripts/GRMLBASE/05-hostname

index 7909510..bf0fe1e 100644 (file)
@@ -5,6 +5,7 @@ grml-live (0.0.9) unstable; urgency=low
   * Fix 'dependency problems' handling in buildd functions.
   * Add buildd/remove_isos.sh to remove generated ISOs.
   * Support kernel upgrades via according /etc/kernel-img.conf configuration.
+  * Set hostname in instsoft-hook already.
   * Add new packages to GRML_FULL:
     - hdapsd
     - hdaps-utils
index ac85fd9..7222028 100755 (executable)
@@ -13,6 +13,11 @@ set -e
 # visualize chroot inside zsh:
 echo grml_chroot > $target/etc/debian_chroot
 
+HOSTNAME=''
+[ -r /etc/grml/grml-live.conf ] && . /etc/grml/grml-live.conf
+[ -n "$HOSTNAME" ] || HOSTNAME=grml
+echo "$HOSTNAME" > $target/etc/hostname
+
 if [ "$FAI_ACTION" = "softupdate" ] ; then
    echo "Softupdate of FAI via grml-live running"
 
index 2385be3..63b9b8e 100755 (executable)
@@ -15,5 +15,10 @@ HOSTNAME=''
 [ -n "$HOSTNAME" ] || HOSTNAME=grml
 echo "$HOSTNAME" > $target/etc/hostname
 
+#if [ -r $target/etc/postfix/main.cf ] ; then
+#  sed -i "s/^mydestination = .*/mydestination = $HOSTNAME, localhost, localhost.localdomain/" $target/etc/postfix/main.cf
+#  sed -i "s/^myhostname = .*/myhostname = $HOSTNAME/" $target/etc/postfix/main.cf
+#fi
+
 ## END OF FILE #################################################################
 # vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=3