Return-Path: X-Original-To: apmail-cloudstack-commits-archive@www.apache.org Delivered-To: apmail-cloudstack-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id EB90A17E29 for ; Sun, 8 Mar 2015 14:32:51 +0000 (UTC) Received: (qmail 11338 invoked by uid 500); 8 Mar 2015 14:32:51 -0000 Delivered-To: apmail-cloudstack-commits-archive@cloudstack.apache.org Received: (qmail 11240 invoked by uid 500); 8 Mar 2015 14:32:51 -0000 Mailing-List: contact commits-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list commits@cloudstack.apache.org Received: (qmail 10938 invoked by uid 99); 8 Mar 2015 14:32:51 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 08 Mar 2015 14:32:51 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 25B3EDFF4C; Sun, 8 Mar 2015 14:32:51 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: pdion891@apache.org To: commits@cloudstack.apache.org Date: Sun, 08 Mar 2015 14:32:54 -0000 Message-Id: In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [4/7] cloudstack-docs-admin git commit: Update templates.rst Update templates.rst echo does not print backslash-newline as a newline. Use printf instead, and remove trailing spaces Signed-off-by: Pierre-Luc Dion Project: http://git-wip-us.apache.org/repos/asf/cloudstack-docs-admin/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack-docs-admin/commit/4ee92ca1 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack-docs-admin/tree/4ee92ca1 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack-docs-admin/diff/4ee92ca1 Branch: refs/heads/master Commit: 4ee92ca1c1add254d68bc3fde0d4dbe539522fea Parents: 708cb99 Author: Martijn Koster Authored: Wed Feb 18 23:17:32 2015 +0000 Committer: Pierre-Luc Dion Committed: Sun Mar 8 10:16:47 2015 -0400 ---------------------------------------------------------------------- source/templates.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack-docs-admin/blob/4ee92ca1/source/templates.rst ---------------------------------------------------------------------- diff --git a/source/templates.rst b/source/templates.rst index 69480ad..0673032 100644 --- a/source/templates.rst +++ b/source/templates.rst @@ -414,7 +414,7 @@ templating. fqdn="$hostname.$(cat /var/lib/dhcp/dhclient.eth0.leases | awk ' /domain-name/ { domain = $3 } END { printf domain } ' | sed 's/[";]//g')" ip=$(cat /var/lib/dhcp/dhclient.eth0.leases | awk ' /fixed-address/ { lease = $2 } END { printf lease } ' | sed 's/[";]//g') echo "cloudstack-hostname: Hostname _localhost_ detected. Changing hostname and adding hosts." - echo " Hostname: $hostname \n FQDN: $fqdn \n IP: $ip" + printf " Hostname: $hostname\n FQDN: $fqdn\n IP: $ip" # Update /etc/hosts awk -v i="$ip" -v f="$fqdn" -v h="$hostname" "/^127/{x=1} !/^127/ && x { x=0; print i,f,h; } { print $0; }" /etc/hosts > /etc/hosts.dhcp.tmp mv /etc/hosts /etc/hosts.dhcp.bak