From 19534a8a96ed5253e5c3470bc5241b48eae74275 Mon Sep 17 00:00:00 2001 From: Ben Gras Date: Tue, 13 Sep 2005 13:27:35 +0000 Subject: [PATCH] /home size check --- commands/scripts/setup.sh | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/commands/scripts/setup.sh b/commands/scripts/setup.sh index 01a13375f..76f9fb10b 100755 --- a/commands/scripts/setup.sh +++ b/commands/scripts/setup.sh @@ -396,8 +396,17 @@ done nohome="0" +homesize="" if [ ! "$auto" = r ] -then homesize="" +then homesize="`devsize /dev/$home` / 2 / 1024" + if [ "$homesize" -gt "$maxhome" ] + then + echo "Sorry, but your /home is too big ($homesize MB) to leave enough" + echo "space on the rest of the partition ($devsizemb MB) for your" + echo "selected installation size ($TOTALMB MB)." + exit 1 + fi +else echo "" echo " --- Step 6: Select the size of /home ----------------------------------" while [ -z "$homesize" ] @@ -418,9 +427,10 @@ echo " --- Step 6: Select the size of /home ----------------------------------" if [ "$homesize" = "" ] ; then homesize=$defmb; fi if [ "$homesize" -lt 1 ] then nohome=1 + echo "Ok, not making a /home." homesize=0 else - if [ "`expr $TOTALMB + $homesize`" -gt "$devsizemb" ] + if [ "$homesize" -gt "$maxhome" ] then echo "That won't fit!" else echo -n "$homesize MB Ok? [Y] " -- 2.44.0