From abcc4ca9bfc0ca22ce0294616088256062a971fe Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Wed, 8 Jun 2011 11:30:29 +0100 Subject: Add --swap-file-path and --swap-file-size options (Closes: #629637). --- scripts/build/lb_chroot_hacks | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'scripts/build/lb_chroot_hacks') diff --git a/scripts/build/lb_chroot_hacks b/scripts/build/lb_chroot_hacks index ab5e3ab04..33c24d679 100755 --- a/scripts/build/lb_chroot_hacks +++ b/scripts/build/lb_chroot_hacks @@ -273,6 +273,11 @@ then ln -s /proc/mounts chroot/etc/mtab fi +if [ "${LB_SWAP_FILE_PATH}" ]; then + dd if=/dev/zero of="chroot/${LB_SWAP_FILE_PATH}" bs=1024k count="${LB_SWAP_FILE_SIZE}" + mkswap "chroot/${LB_SWAP_FILE_PATH}" +fi + # Show popular warnings if [ -e chroot/etc/init.d/resolvconf ] then -- cgit v1.2.3