From e88e5f0d26072313e3a2fceb765e81a9881c323a Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Sun, 14 Apr 2013 17:13:52 +0200 Subject: [PATCH] makedist.inc.sh: create /etc/hostname with appropriate hostname --- makedist.inc.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/makedist.inc.sh b/makedist.inc.sh index 2478de7..b11a001 100644 --- a/makedist.inc.sh +++ b/makedist.inc.sh @@ -80,6 +80,7 @@ fi [[ "$TARGET_HOSTNAME" ]] || TARGET_HOSTNAME="$MAKEDIST_TARGET" [[ "$TARGET_DOMAIN" ]] || TARGET_DOMAIN="localdomain" +echo "$TARGET_HOSTNAME" > $MOUNTDIR/etc/hostname sed -i "s|HOSTNAME=.*|HOSTNAME=$TARGET_HOSTNAME|" $MOUNTDIR/etc/sysconfig/network sed -i "s|\(127\.0\.0\.1\W*\)\(.*\)|\1 $TARGET_HOSTNAME.$TARGET_DOMAIN $TARGET_HOSTNAME \2|" \ $MOUNTDIR/etc/hosts