#!/bin/sh
  
dialog \
--title "SELECT INODE DENSITY" \
--menu "Ext2 file system defaults to one inode per 4096 bytes \
of drive space. EACH FILE requires ONE INODE. Therefore, \
if you're going to have many small files on your drive, \
you need more inodes (--> choose smaller value -- '2048' or '1024'). \
However, more inodes also means slower file access. \
If your files are not going to be small, then just hit return \
to accept the default of 4096 bytes." \ 18 65 3 \
"4096" "1 inode per 4096 bytes. (default)" \
"2048" "1 inode per 2048 bytes." \
"1024" "1 inode per 1024 bytes." \
2> /tmp/Finode_density
    
INODE_DENSITY="`cat /tmp/Finode_density`"
rm -f /tmp/Finode_density

if [ ! "$INODE_DENSITY" = "2048" -a ! "$INODE_DENSITY" = "1024" ]; then
   INODE_DENSITY=4096
fi
   
echo "Inode density: 1 inode per $INODE_DENSITY bytes."

   
