CLOUDSTACK-1340: Fix path issues in postinstall.sh, zerodisk on all partitions

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
This commit is contained in:
Rohit Yadav 2013-02-27 17:56:55 +05:30
parent 51f66e2b52
commit 9c6ced96c1
2 changed files with 14 additions and 12 deletions

View File

@ -91,7 +91,7 @@ EOF
fix_inittab() {
# Fix inittab
cat >> etc/inittab << EOF
cat >> /etc/inittab << EOF
vc:2345:respawn:/sbin/getty 38400 hvc0
EOF
@ -99,16 +99,16 @@ EOF
fix_acpid() {
# Fix acpid
mkdir -p etc/acpi/events
cat >> etc/acpi/events/power << EOF
mkdir -p /etc/acpi/events
cat >> /etc/acpi/events/power << EOF
event=button/power.*
action=/usr/local/sbin/power.sh "%e"
EOF
cat >> usr/local/sbin/power.sh << EOF
cat >> /usr/local/sbin/power.sh << EOF
#!/bin/bash
/sbin/poweroff
EOF
chmod a+x usr/local/sbin/power.sh
chmod a+x /usr/local/sbin/power.sh
}
fix_hostname() {
@ -149,8 +149,8 @@ configure_services() {
# Get config files from master
snapshot_url="https://git-wip-us.apache.org/repos/asf?p=incubator-cloudstack.git;a=snapshot;h=HEAD;sf=tgz"
snapshot_dir="/tmp/incubator-cloudstack*"
cd /tmp
snapshot_dir="/opt/incubator-cloudstack*"
cd /opt
wget $snapshot_url -O cloudstack.tar.gz
tar -zxvf cloudstack.tar.gz
cp -rv $snapshot_dir/patches/systemvm/debian/config/* /

View File

@ -1,8 +1,10 @@
#clean up stuff copied in by veewee
# Clean up stuff copied in by veewee
rm -f /root/*
# Zero out the free space to save space in the final image:
dd if=/dev/zero of=/EMPTY bs=1M
sync
rm -f /EMPTY
for path in / /boot /usr /var /opt /tmp
do
dd if=/dev/zero of=$path/zero bs=1M
sync
rm -f $i/zero
done