From 340dd9a1794e6a5700ed70ec56a35ef117f0fe79 Mon Sep 17 00:00:00 2001 From: bill-auger Date: Tue, 7 Apr 2020 19:00:24 -0400 Subject: [PATCH] bugfix - extra packges could overflow root fs size --- src/pvmbootstrap.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pvmbootstrap.sh b/src/pvmbootstrap.sh index 3547c28..40cc89e 100755 --- a/src/pvmbootstrap.sh +++ b/src/pvmbootstrap.sh @@ -443,8 +443,8 @@ main() # ( [cli_options] imagefile arch ) # vaidate options and calculate options-dependent vars (( $RootSizeMb > 0 )) && \ - (( $RootSizeMb < $MinRootMb )) && warning "specified root FS size too small - ignoring PkgsOptional" - (( $RootSizeMb < $MinRootMb )) && RootSizeMb=$MinRootMb && PkgsOptional=() + (( $RootSizeMb < $MinRootMb )) && warning "specified root FS size too small - ignoring -c and -p packages" + (( $RootSizeMb < $MinRootMb )) && RootSizeMb=$MinRootMb PkgsCached=() PkgsOptional=() RootSizeMb=$(( $RootSizeMb + (${#Kernels[@]} * 75) )) ImgSizeMb=$(( $BootSizeMb + $SwapSizeMb + $RootSizeMb )) HasSwap=$( (( $SwapSizeMb > 0 )) && echo 1 || echo 0 )