cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhais...@apache.org
Subject [cloudstack] 02/02: more fixes
Date Sun, 26 Nov 2017 06:31:57 GMT
This is an automated email from the ASF dual-hosted git repository.

bhaisaab pushed a commit to branch debian9-systemvmtemplate
in repository https://gitbox.apache.org/repos/asf/cloudstack.git

commit 593d125ae9cbd7374f9aabaf91de1831b4e57a7e
Author: Rohit Yadav <rohit.yadav@shapeblue.com>
AuthorDate: Sun Nov 26 12:01:31 2017 +0530

    more fixes
    
    Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
---
 tools/appliance/definitions/systemvmtemplate/configure_grub.sh    | 8 +++-----
 tools/appliance/definitions/systemvmtemplate/configure_login.sh   | 1 -
 .../definitions/systemvmtemplate/install_systemvm_packages.sh     | 2 +-
 tools/appliance/definitions/systemvmtemplate/preseed.cfg          | 4 ++--
 tools/appliance/definitions/systemvmtemplate/zerodisk.sh          | 5 +++++
 5 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/tools/appliance/definitions/systemvmtemplate/configure_grub.sh b/tools/appliance/definitions/systemvmtemplate/configure_grub.sh
index be1537e..5ea5d4d 100644
--- a/tools/appliance/definitions/systemvmtemplate/configure_grub.sh
+++ b/tools/appliance/definitions/systemvmtemplate/configure_grub.sh
@@ -19,19 +19,17 @@
 set -e
 set -x
 
-# Remove 5s grub timeout to speed up booting
 function configure_grub() {
-  grep GRUB_TIMEOUT=0 /etc/default/grub && return
-
   cat <<EOF > /etc/default/grub
 # If you change this file, run 'update-grub' afterwards to update
 # /boot/grub/grub.cfg.
 
 GRUB_DEFAULT=0
 GRUB_TIMEOUT=0
-GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
+GRUB_DISTRIBUTOR=Debian
 GRUB_CMDLINE_LINUX_DEFAULT="quiet"
-GRUB_CMDLINE_LINUX="console=tty0 console=ttyS0,115200n8 net.ifnames=0 biosdevname=0 debian-installer=en_US"
+GRUB_CMDLINE_LINUX="console=tty0 console=ttyS0,115200n8 console=hvc0 earlyprintk=xen net.ifnames=0
biosdevname=0 debian-installer=en_US"
+GRUB_CMDLINE_XEN="com1=115200 console=com1"
 GRUB_TERMINAL="console serial"
 GRUB_SERIAL_COMMAND="serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1"
 GRUB_GFXMODE=640x480
diff --git a/tools/appliance/definitions/systemvmtemplate/configure_login.sh b/tools/appliance/definitions/systemvmtemplate/configure_login.sh
index 5bc6fb9..d5f80b1 100644
--- a/tools/appliance/definitions/systemvmtemplate/configure_login.sh
+++ b/tools/appliance/definitions/systemvmtemplate/configure_login.sh
@@ -62,7 +62,6 @@ function configure_inittab() {
   # Fix inittab
   cat >> /etc/inittab << EOF
 
-0:2345:respawn:/sbin/getty -L 115200 ttyS0 vt102
 vc:2345:respawn:/sbin/getty 38400 hvc0
 EOF
 }
diff --git a/tools/appliance/definitions/systemvmtemplate/install_systemvm_packages.sh b/tools/appliance/definitions/systemvmtemplate/install_systemvm_packages.sh
index e831347..4c84a6c 100644
--- a/tools/appliance/definitions/systemvmtemplate/install_systemvm_packages.sh
+++ b/tools/appliance/definitions/systemvmtemplate/install_systemvm_packages.sh
@@ -52,7 +52,7 @@ function install_packages() {
     ${apt_get} install links:i386 libuuid1:i386 libc6:i386
   fi
 
-  ${apt_get} install \
+  ${apt_get} install grub-legacy \
     rsyslog logrotate cron insserv net-tools ifupdown vim tmux netbase iptables \
     openssh-server e2fsprogs tcpdump socat wget \
     python bzip2 sed gawk diffutils grep gzip less tar telnet ftp rsync traceroute psmisc
lsof procps \
diff --git a/tools/appliance/definitions/systemvmtemplate/preseed.cfg b/tools/appliance/definitions/systemvmtemplate/preseed.cfg
index 6d56b76..99bd6eb 100644
--- a/tools/appliance/definitions/systemvmtemplate/preseed.cfg
+++ b/tools/appliance/definitions/systemvmtemplate/preseed.cfg
@@ -57,10 +57,10 @@ d-i partman-auto/method string regular
 d-i partman-auto/choose_recipe select atomic
 d-i partman-auto/expert_recipe string                         \
       boot-root ::                                            \
-              80 50 100 ext4                                  \
+              80 50 100 ext2                                  \
                       $primary{ } $bootable{ }                \
                       method{ format } format{ }              \
-                      use_filesystem{ } filesystem{ ext4 }    \
+                      use_filesystem{ } filesystem{ ext2 }    \
                       mountpoint{ /boot }                     \
               .                                               \
               1500 40 1600 ext4                               \
diff --git a/tools/appliance/definitions/systemvmtemplate/zerodisk.sh b/tools/appliance/definitions/systemvmtemplate/zerodisk.sh
index 7adea8a..3dd9dbc 100644
--- a/tools/appliance/definitions/systemvmtemplate/zerodisk.sh
+++ b/tools/appliance/definitions/systemvmtemplate/zerodisk.sh
@@ -39,6 +39,11 @@ function zero_disk() {
     sync
     rm -f ${path}/zero
   done
+
+  for partition in $(blkid -o list | grep ^/dev | grep -v swap | awk '{print $1}')
+  do
+    tune2fs -m0 $partition
+  done
 }
 
 return 2>/dev/null || zero_disk

-- 
To stop receiving notification emails like this one, please contact
"commits@cloudstack.apache.org" <commits@cloudstack.apache.org>.

Mime
View raw message