Skip to content

Commit ff32ae5

Browse files
committed
CLOUDSTACK-1340: During cleanup deluser vagrant, sync after zero-ing the disk
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
1 parent 23be2e7 commit ff32ae5

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

tools/appliance/definitions/systemvmtemplate/cleanup.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,6 @@ rm /lib/udev/rules.d/75-persistent-net-generator.rules
1717

1818
echo "Adding a 2 sec delay to the interface up, to make the dhclient happy"
1919
echo "pre-up sleep 2" >> /etc/network/interfaces
20+
21+
# Remove the vagrant user
22+
deluser --group --force -remove-home vagrant

tools/appliance/definitions/systemvmtemplate/zerodisk.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@ rm -f /root/*
33

44
# Zero out the free space to save space in the final image:
55
dd if=/dev/zero of=/EMPTY bs=1M
6+
sync
67
rm -f /EMPTY
78

0 commit comments

Comments
 (0)