live-bootstrap/steps/improve/swap.sh
Gábor Stefanik 6d26855dc6 Support reboot in non-chroot modes using grub and an init script
We use grub-2.06 as 2.12 has some packaging issues, and can't be
built in live-bootstrap for now.
2024-02-04 16:54:13 +01:00

18 lines
338 B
Bash

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