cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhais...@apache.org
Subject [10/50] git commit: updated refs/heads/master to 1290e10
Date Mon, 22 Sep 2014 19:44:09 GMT
CLOUDSTACK-7143: move networking logic from postinstall.sh to configure_networking.sh


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/a533de75
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/a533de75
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/a533de75

Branch: refs/heads/master
Commit: a533de7593a9605f42a2a84e5a15e36c4b911d75
Parents: 3574dcf
Author: Leo Simons <lsimons@schubergphilis.com>
Authored: Mon Jul 21 11:41:37 2014 +0200
Committer: Rohit Yadav <rohit.yadav@shapeblue.com>
Committed: Mon Sep 22 21:34:47 2014 +0200

----------------------------------------------------------------------
 .../systemvmtemplate/configure_networking.sh    | 23 ++++++++++++++++++++
 .../definitions/systemvmtemplate/definition.rb  |  2 +-
 .../definitions/systemvmtemplate/postinstall.sh | 20 -----------------
 3 files changed, 24 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a533de75/tools/appliance/definitions/systemvmtemplate/configure_networking.sh
----------------------------------------------------------------------
diff --git a/tools/appliance/definitions/systemvmtemplate/configure_networking.sh b/tools/appliance/definitions/systemvmtemplate/configure_networking.sh
index eca0d5c..4d1fcce 100644
--- a/tools/appliance/definitions/systemvmtemplate/configure_networking.sh
+++ b/tools/appliance/definitions/systemvmtemplate/configure_networking.sh
@@ -1,2 +1,25 @@
+HOSTNAME=systemvm
+
 echo "Adding a 2 sec delay to the interface up, to make the dhclient happy"
 echo "pre-up sleep 2" >> /etc/network/interfaces
+
+fix_nameserver() {
+  # Replace /etc/resolv.conf also
+  cat > /etc/resolv.conf << EOF
+nameserver 8.8.8.8
+nameserver 8.8.4.4
+EOF
+}
+
+fix_hostname() {
+  # Fix hostname in openssh-server generated keys
+  sed -i "s/root@\(.*\)$/root@$HOSTNAME/g" /etc/ssh/ssh_host_*.pub
+  # Fix hostname to override one provided by dhcp during vm build
+  echo "$HOSTNAME" > /etc/hostname
+  hostname $HOSTNAME
+  # Delete entry in /etc/hosts derived from dhcp
+  sed -i '/127.0.1.1/d' /etc/hosts
+}
+
+fix_hostname
+fix_nameserver

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a533de75/tools/appliance/definitions/systemvmtemplate/definition.rb
----------------------------------------------------------------------
diff --git a/tools/appliance/definitions/systemvmtemplate/definition.rb b/tools/appliance/definitions/systemvmtemplate/definition.rb
index 48c656c..6daa7ff 100644
--- a/tools/appliance/definitions/systemvmtemplate/definition.rb
+++ b/tools/appliance/definitions/systemvmtemplate/definition.rb
@@ -62,11 +62,11 @@ config = {
         'configure_grub.sh',
         'configure_locale.sh',
         'configure_login.sh',
+        'configure_networking.sh',
         'postinstall.sh',
         'configure_acpid.sh',
         'configure_conntrack.sh',
         'cleanup.sh',
-        'configure_networking.sh',
         'zerodisk.sh'
     ],
     :postinstall_timeout => '10000'

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a533de75/tools/appliance/definitions/systemvmtemplate/postinstall.sh
----------------------------------------------------------------------
diff --git a/tools/appliance/definitions/systemvmtemplate/postinstall.sh b/tools/appliance/definitions/systemvmtemplate/postinstall.sh
index 55d658b..7ce032c 100644
--- a/tools/appliance/definitions/systemvmtemplate/postinstall.sh
+++ b/tools/appliance/definitions/systemvmtemplate/postinstall.sh
@@ -108,32 +108,12 @@ install_packages() {
   apt-get --no-install-recommends -q -y --force-yes install radvd
 }
 
-fix_nameserver() {
-  # Replace /etc/resolv.conf also
-  cat > /etc/resolv.conf << EOF
-nameserver 8.8.8.8
-nameserver 8.8.4.4
-EOF
-}
-
-fix_hostname() {
-  # Fix hostname in openssh-server generated keys
-  sed -i "s/root@\(.*\)$/root@$HOSTNAME/g" /etc/ssh/ssh_host_*.pub
-  # Fix hostname to override one provided by dhcp during vm build
-  echo "$HOSTNAME" > /etc/hostname
-  hostname $HOSTNAME
-  # Delete entry in /etc/hosts derived from dhcp
-  sed -i '/127.0.1.1/d' /etc/hosts
-}
-
 fix_vhdutil() {
   wget --no-check-certificate http://download.cloud.com.s3.amazonaws.com/tools/vhd-util -O
/bin/vhd-util
   chmod a+x /bin/vhd-util
 }
 
 do_fixes() {
-  fix_nameserver
-  fix_hostname
   fix_vhdutil
 }
 


Mime
View raw message