From 19304f2d79b05edc114f8863831d9c7ec0d289df Mon Sep 17 00:00:00 2001 From: Leif Johansson Date: Wed, 20 Apr 2016 17:29:04 +0200 Subject: [PATCH] short hostname i /etc/hosts --- global/overlay/etc/cosmos/apt/bootstrap-cosmos.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/global/overlay/etc/cosmos/apt/bootstrap-cosmos.sh b/global/overlay/etc/cosmos/apt/bootstrap-cosmos.sh index 88bd549..1534dc5 100755 --- a/global/overlay/etc/cosmos/apt/bootstrap-cosmos.sh +++ b/global/overlay/etc/cosmos/apt/bootstrap-cosmos.sh @@ -33,6 +33,8 @@ if ! test -d /var/cache/cosmos/repo; then fi hostname $cmd_hostname +short=`echo ${cmd_hostname} | awk -F. '{print $1}'` +echo "127.0.1.1 ${cmd_hostname} ${short}" >> /etc/hosts perl -pi -e "s,#COSMOS_REPO_MODELS=.*,COSMOS_REPO_MODELS=\"\\\$COSMOS_REPO/global/:\\\$COSMOS_REPO/$cmd_hostname/\"," /etc/cosmos/cosmos.conf perl -pi -e "s,#COSMOS_UPDATE_VERIFY_GIT_TAG_PATTERN=.*,COSMOS_UPDATE_VERIFY_GIT_TAG_PATTERN=\"${cmd_tags}*\"," /etc/cosmos/cosmos.conf