logo

live-bootstrap

Mirror of <https://github.com/fosslinux/live-bootstrap>

swap.sh (338B)


  1. #!/bin/sh
  2. #
  3. # SPDX-FileCopyrightText: 2024 Gábor Stefanik <netrolller.3d@gmail.com>
  4. #
  5. # SPDX-License-Identifier: GPL-3.0-or-later
  6. #
  7. # Set up swap
  8. . /steps/bootstrap.cfg
  9. . /steps/env
  10. if ! test -f /swapfile
  11. then
  12. echo "Making swap..."
  13. dd if=/dev/zero of=/swapfile bs=1M count=${SWAP_SIZE}
  14. mkswap /swapfile
  15. fi
  16. swapon /swapfile