]> Zhao Yanbai Git Server - minix.git/commitdiff
any blocksize.
authorBen Gras <ben@minix3.org>
Wed, 2 Dec 2009 15:33:14 +0000 (15:33 +0000)
committerBen Gras <ben@minix3.org>
Wed, 2 Dec 2009 15:33:14 +0000 (15:33 +0000)
commands/scripts/setup.sh

index 1231771d2fdb0bb3806b5f13b4a7cffa254641b8..d8c32fb27338296b3c3cd2bdfa96df924c5d3c4f 100755 (executable)
@@ -395,6 +395,8 @@ else
        homemb="current size"
 fi
 
+minblocksize=1
+maxblocksize=64
 blockdefault=4
 
 if [ ! "$auto" = "r" ]
@@ -403,16 +405,16 @@ then
 echo " --- Step 6: Select a block size ---------------------------------------"
        echo ""
        
-       echo "The default file system block size is $blockdefault KB."
+       echo "The default file system block size is $blockdefault kB."
        echo ""
        
        while [ -z "$blocksize" ]
        do      
                echo -n "Block size in kilobytes? [$blockdefault] "; read blocksize
                test -z "$blocksize" && blocksize=$blockdefault
-               if [ "$blocksize" -ne 1 -a "$blocksize" -ne 2 -a "$blocksize" -ne 4 -a "$blocksize" -ne 8 ]
+               if [ "$blocksize" -lt $minblocksize -o "$blocksize" -gt $maxblocksize ]
                then    
-                       warn "1, 2, 4 or 8 please"
+                       warn "At least $minblocksize kB and at most $maxblocksize kB please."
                        blocksize=""
                fi
        done