Repository: cloudstack-docs-admin
Updated Branches:
  refs/heads/master 802e0d3c5 -> 26cd1b738


Update templates.rst

remove two space
add /etc/init.d/hostname.sh start
             echo $hostname > /proc/sys/kernel/hostname
             # Recreate SSH2

This closes #18

Signed-off-by: Sebastien Goasguen <run...@gmail.com>


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/26cd1b73
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack-docs-admin/tree/26cd1b73
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack-docs-admin/diff/26cd1b73

Branch: refs/heads/master
Commit: 26cd1b73877074809dc1bc2e84cef0e6fc8aef04
Parents: 802e0d3
Author: baiqj <linux...@gmail.com>
Authored: Thu Aug 28 15:28:46 2014 +0800
Committer: Sebastien Goasguen <run...@gmail.com>
Committed: Tue Sep 9 04:49:24 2014 -0400

----------------------------------------------------------------------
 source/templates.rst | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack-docs-admin/blob/26cd1b73/source/templates.rst
----------------------------------------------------------------------
diff --git a/source/templates.rst b/source/templates.rst
index bc55aa2..b473043 100644
--- a/source/templates.rst
+++ b/source/templates.rst
@@ -416,12 +416,14 @@ templating.
              echo "cloudstack-hostname: Hostname _localhost_ detected. 
Changing hostname and adding hosts."
              echo " 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
+             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
              mv /etc/hosts.dhcp.tmp /etc/hosts
              # Rename Host
              echo $hostname > /etc/hostname
              hostname $hostname
+             /etc/init.d/hostname.sh start
+             echo $hostname > /proc/sys/kernel/hostname
              # Recreate SSH2
              export DEBIAN_FRONTEND=noninteractive
              dpkg-reconfigure openssh-server

Reply via email to