diff options
author | Adrian Schröter <adrian@suse.de> | 2014-07-09 15:02:40 +0200 |
---|---|---|
committer | Adrian Schröter <adrian@suse.de> | 2014-07-09 15:02:40 +0200 |
commit | 811c84f0cf0e133e71c2a6aa2f9b969c3169676a (patch) | |
tree | 58dd60ccc1115278bb742249d2b6629a5f92eab3 | |
parent | b42af5ce99a21f5784edd7dffa172b0efe682f60 (diff) |
- run mkswap only inside the VM, it can have a different format
-rw-r--r-- | build-vm | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -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 } |