summaryrefslogtreecommitdiff
path: root/build-vm
diff options
context:
space:
mode:
authorAdrian Schröter <adrian@suse.de>2014-07-09 15:02:40 +0200
committerAdrian Schröter <adrian@suse.de>2014-07-09 15:02:40 +0200
commit811c84f0cf0e133e71c2a6aa2f9b969c3169676a (patch)
tree58dd60ccc1115278bb742249d2b6629a5f92eab3 /build-vm
parentb42af5ce99a21f5784edd7dffa172b0efe682f60 (diff)
- run mkswap only inside the VM, it can have a different format
Diffstat (limited to 'build-vm')
-rw-r--r--build-vm8
1 files changed, 3 insertions, 5 deletions
diff --git a/build-vm b/build-vm
index 124926f..7d995fe 100644
--- a/build-vm
+++ b/build-vm
@@ -451,9 +451,8 @@ vm_detect_2nd_stage() {
mknod "$VM_SWAP" b 3 2
umask 022
fi
- # Usually the external system is writing the swap signature, but EC2 volume
- # attach is very slow, so let's do it in the VM for now.
- test "$VM_TYPE" = ec2 && mkswap "$VM_SWAP"
+ # Do not rely on external system writing the signature, it might differ...
+ mkswap "$VM_SWAP"
swapon -v "$VM_SWAP" || exit 1
fi
HOST="$MYHOSTNAME"
@@ -563,9 +562,8 @@ vm_setup() {
if test -n "$VM_SWAP" ; then
vm_attach_swap
dd if=/dev/zero of="$VM_SWAP" bs=1024 count=1 conv=notrunc 2>/dev/null
- echo "mkswap $VM_SWAP"
- mkswap "$VM_SWAP"
vm_detach_swap
+ # mkswap happens inside of the vm
fi
}