From 370b9851f30d358961fcf420a77c8c38f982d607 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Mon, 12 Nov 2007 11:58:16 +0100 Subject: [PATCH] Set hostname in instsoft-hook already --- debian/changelog | 1 + etc/grml/fai/config/hooks/instsoft.GRMLBASE | 5 +++++ etc/grml/fai/config/scripts/GRMLBASE/05-hostname | 5 +++++ 3 files changed, 11 insertions(+) diff --git a/debian/changelog b/debian/changelog index 7909510..bf0fe1e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 diff --git a/etc/grml/fai/config/hooks/instsoft.GRMLBASE b/etc/grml/fai/config/hooks/instsoft.GRMLBASE index ac85fd9..7222028 100755 --- a/etc/grml/fai/config/hooks/instsoft.GRMLBASE +++ b/etc/grml/fai/config/hooks/instsoft.GRMLBASE @@ -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" diff --git a/etc/grml/fai/config/scripts/GRMLBASE/05-hostname b/etc/grml/fai/config/scripts/GRMLBASE/05-hostname index 2385be3..63b9b8e 100755 --- a/etc/grml/fai/config/scripts/GRMLBASE/05-hostname +++ b/etc/grml/fai/config/scripts/GRMLBASE/05-hostname @@ -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 -- 2.1.4