Updated Branches: refs/heads/master 51f66e2b5 -> 9c6ced96c
CLOUDSTACK-1340: Fix path issues in postinstall.sh, zerodisk on all partitions Signed-off-by: Rohit Yadav <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/9c6ced96 Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/9c6ced96 Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/9c6ced96 Branch: refs/heads/master Commit: 9c6ced96c12e5467fd2d09b1b8672d6d93d0056b Parents: 51f66e2 Author: Rohit Yadav <[email protected]> Authored: Wed Feb 27 17:56:55 2013 +0530 Committer: Rohit Yadav <[email protected]> Committed: Wed Feb 27 17:56:55 2013 +0530 ---------------------------------------------------------------------- .../definitions/systemvmtemplate/postinstall.sh | 14 +++++++------- .../definitions/systemvmtemplate/zerodisk.sh | 12 +++++++----- 2 files changed, 14 insertions(+), 12 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/9c6ced96/tools/appliance/definitions/systemvmtemplate/postinstall.sh ---------------------------------------------------------------------- diff --git a/tools/appliance/definitions/systemvmtemplate/postinstall.sh b/tools/appliance/definitions/systemvmtemplate/postinstall.sh index d035527..4bce4a5 100644 --- a/tools/appliance/definitions/systemvmtemplate/postinstall.sh +++ b/tools/appliance/definitions/systemvmtemplate/postinstall.sh @@ -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/* / http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/9c6ced96/tools/appliance/definitions/systemvmtemplate/zerodisk.sh ---------------------------------------------------------------------- diff --git a/tools/appliance/definitions/systemvmtemplate/zerodisk.sh b/tools/appliance/definitions/systemvmtemplate/zerodisk.sh index 0d105c2..d9f978a 100644 --- a/tools/appliance/definitions/systemvmtemplate/zerodisk.sh +++ b/tools/appliance/definitions/systemvmtemplate/zerodisk.sh @@ -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
