summaryrefslogtreecommitdiff
path: root/scripts/build/lb_chroot_hacks
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/build/lb_chroot_hacks')
-rwxr-xr-xscripts/build/lb_chroot_hacks5
1 files changed, 5 insertions, 0 deletions
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