Skip to content

Commit

Permalink
Fix to specify correct additional space required for installation
Browse files Browse the repository at this point in the history
  • Loading branch information
iliajie committed Feb 15, 2023
1 parent 6735e1f commit e328954
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions slib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,7 @@ get_distro () {
# adding a swap file.
memory_ok () {
min_mem=$1
disk_space_required=$2
# If Virtualmin swap hasn't been setup yet, try doing it
is_swap=$(swapon -s|grep /swap.vm)
if [ -n $is_swap ]; then
Expand Down Expand Up @@ -642,17 +643,17 @@ memory_ok () {
echo " grows very large when installing large lists of packages). You could exit"
echo " and re-install with the --minimal flag to install a more compact selection"
echo " of packages, or we can try to create a swap file for you. To create a swap"
echo " file, you'll need ${swap_min_h} MB free disk space, in addition to 200-300 MB"
echo " of free space for package installation."
echo " file, you'll need ${swap_min_h} MB free disk space, in addition to $disk_space_required GB of free space"
echo " for packages installation."
echo
echo " Would you like to continue? If you continue, you will be given the option to"
printf " create a swap file. (y/n) "
if ! yesno; then
return 1 # Should exit when this function returns 1
fi
echo
echo " Would you like for me to try to create a swap file? This will require at"
echo " least ${swap_min_h} MB of free space, in addition to 200-300 MB for the"
echo " Would you like for me to try to create a swap file? This will require"
echo " at least ${swap_min_h} MB of free space, in addition to $disk_space_required GB for the"

printf " installation. (y/n) "
if ! yesno; then
Expand Down

0 comments on commit e328954

Please sign in to comment.