From a88e2acffb801601a03076ba10c807e6b1100a4c Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Mon, 5 Sep 2011 11:23:49 +0000 Subject: [PATCH] deployment.sh: make sure PRO systems are being shipped with activated swap space Swap partition has been prepared already but wasn't enabled through /etc/fstab. Thanks to Richard for finding and reporting this issue. Closes: https://bugtracker.sipwise.com/view.php?id=665 From: Michael Prokop --- deployment.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/deployment.sh b/deployment.sh index a820de6..07964db 100755 --- a/deployment.sh +++ b/deployment.sh @@ -598,6 +598,16 @@ fi sync mount /dev/${DISK}1 $TARGET +if [[ $(imvirt) == "Physical" ]] || $PRO_EDITION ; then + # provide useable swap partition + SWAP_PARTITION="/dev/${DISK}2" + + echo "Enabling swap partition $SWAP_PARTITION via /etc/fstab" + cat >> "${TARGET}/etc/fstab" << EOF +$SWAP_PARTITION none swap sw,pri=0 0 0 +EOF +fi + # removals: packages which debootstrap installs but d-i doesn't chroot $TARGET apt-get --purge -y remove \ ca-certificates console-tools openssl tcpd xauth