[debian-lan-devel] [debian-lan] 01/01: Prevent HOSTNAME from evaluating to FQDN (from FAI 5 updates)

Afif Elghraoui afif at moszumanska.debian.org
Mon Jan 23 09:04:48 UTC 2017


This is an automated email from the git hooks/post-receive script.

afif pushed a commit to branch master
in repository debian-lan.

commit 2d87afff5b7470f6cbfee8ffd7a5715704e501f2
Author: Afif Elghraoui <afif at debian.org>
Date:   Mon Jan 23 01:01:45 2017 -0800

    Prevent HOSTNAME from evaluating to FQDN (from FAI 5 updates)
    
    See https://lists.uni-koeln.de/pipermail/linux-fai/2016-November/011565.html
    This file is taken from the FAI 5 example configuration space.
    In FAI 4, HOSTNAME evaluated to the plain hostname. In FAI 5, without
    this addition, you get the FQDN, which is not expected in our
    configuration space.
---
 fai/config/hooks/setup.DEFAULT.sh | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/fai/config/hooks/setup.DEFAULT.sh b/fai/config/hooks/setup.DEFAULT.sh
new file mode 100755
index 0000000..00a1df2
--- /dev/null
+++ b/fai/config/hooks/setup.DEFAULT.sh
@@ -0,0 +1,7 @@
+#! /bin/bash
+
+# use short hostname instead of FQDN
+export HOSTNAME=${HOSTNAME%%.*}
+if [ $do_init_tasks -eq 1 ]; then
+  echo $HOSTNAME > /proc/sys/kernel/hostname
+fi

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/debian-lan.git



More information about the debian-lan-devel mailing list