summaryrefslogtreecommitdiff
path: root/scripts/build/lb_chroot_hacks
diff options
context:
space:
mode:
authorColin Watson <cjwatson@canonical.com>2011-06-08 11:30:29 +0100
committerDaniel Baumann <daniel@debian.org>2011-06-13 20:08:34 +0200
commitabcc4ca9bfc0ca22ce0294616088256062a971fe (patch)
tree6853d3604638162e2cbaa03ebd6b788a28c1178e /scripts/build/lb_chroot_hacks
parentf342cd85b8bd0ea30544c429752e0e5b1b09ef7a (diff)
downloadvyos-live-build-abcc4ca9bfc0ca22ce0294616088256062a971fe.tar.gz
vyos-live-build-abcc4ca9bfc0ca22ce0294616088256062a971fe.zip
Add --swap-file-path and --swap-file-size options (Closes: #629637).
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