CLOUDSTACK-1340: During cleanup deluser vagrant, sync after zero-ing the disk
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/b9c12524 Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/b9c12524 Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/b9c12524 Branch: refs/heads/affinity_groups Commit: b9c125240d83f214aceabdf677ba76ddac72444e Parents: 1fa672c Author: Rohit Yadav <[email protected]> Authored: Wed Feb 27 16:59:11 2013 +0530 Committer: Prachi Damle <[email protected]> Committed: Thu Mar 14 15:12:43 2013 -0700 ---------------------------------------------------------------------- .../definitions/systemvmtemplate/cleanup.sh | 3 +++ .../definitions/systemvmtemplate/zerodisk.sh | 1 + 2 files changed, 4 insertions(+), 0 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/b9c12524/tools/appliance/definitions/systemvmtemplate/cleanup.sh ---------------------------------------------------------------------- diff --git a/tools/appliance/definitions/systemvmtemplate/cleanup.sh b/tools/appliance/definitions/systemvmtemplate/cleanup.sh index 6009aad..2dad612 100644 --- a/tools/appliance/definitions/systemvmtemplate/cleanup.sh +++ b/tools/appliance/definitions/systemvmtemplate/cleanup.sh @@ -17,3 +17,6 @@ rm /lib/udev/rules.d/75-persistent-net-generator.rules echo "Adding a 2 sec delay to the interface up, to make the dhclient happy" echo "pre-up sleep 2" >> /etc/network/interfaces + +# Remove the vagrant user +deluser --group --force -remove-home vagrant http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/b9c12524/tools/appliance/definitions/systemvmtemplate/zerodisk.sh ---------------------------------------------------------------------- diff --git a/tools/appliance/definitions/systemvmtemplate/zerodisk.sh b/tools/appliance/definitions/systemvmtemplate/zerodisk.sh index 9fc9f6f..0d105c2 100644 --- a/tools/appliance/definitions/systemvmtemplate/zerodisk.sh +++ b/tools/appliance/definitions/systemvmtemplate/zerodisk.sh @@ -3,5 +3,6 @@ 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
