/home size check
This commit is contained in:
parent
0c83d1f97e
commit
19534a8a96
@ -396,8 +396,17 @@ done
|
|||||||
|
|
||||||
nohome="0"
|
nohome="0"
|
||||||
|
|
||||||
|
homesize=""
|
||||||
if [ ! "$auto" = r ]
|
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 ""
|
||||||
echo " --- Step 6: Select the size of /home ----------------------------------"
|
echo " --- Step 6: Select the size of /home ----------------------------------"
|
||||||
while [ -z "$homesize" ]
|
while [ -z "$homesize" ]
|
||||||
@ -418,9 +427,10 @@ echo " --- Step 6: Select the size of /home ----------------------------------"
|
|||||||
if [ "$homesize" = "" ] ; then homesize=$defmb; fi
|
if [ "$homesize" = "" ] ; then homesize=$defmb; fi
|
||||||
if [ "$homesize" -lt 1 ]
|
if [ "$homesize" -lt 1 ]
|
||||||
then nohome=1
|
then nohome=1
|
||||||
|
echo "Ok, not making a /home."
|
||||||
homesize=0
|
homesize=0
|
||||||
else
|
else
|
||||||
if [ "`expr $TOTALMB + $homesize`" -gt "$devsizemb" ]
|
if [ "$homesize" -gt "$maxhome" ]
|
||||||
then echo "That won't fit!"
|
then echo "That won't fit!"
|
||||||
else
|
else
|
||||||
echo -n "$homesize MB Ok? [Y] "
|
echo -n "$homesize MB Ok? [Y] "
|
||||||
|
Loading…
x
Reference in New Issue
Block a user