while :
do
clear
echo " ---------------------------------------------------------------------------" 
echo "  fd0 GNU/Linux OS -  RBTUI/r00tb0x text user interface  / logged in: $USER "
echo " ---------------------------------------------------------------------------"
echo " 1. view ip configuration                7. change your ip configuration    "
echo " 2. view free RAM & Disks space          8. change your DNS's               "
echo " 3. shell to kiss (stays in the loop)    9. change the hosts file           "
echo " 4. view DNS configuration              10. system info                     "
echo " 5. view routing table                  11. mount a minix ramdisk           "
echo " 6. view the system hosts file          12. exit rbtui (kiss shell)         "
echo " ==========================================================================="
echo -n " choose your way to go [1-12]: "
read rbtuic
case $rbtuic in
1) echo "current ip configuration" ; ifconfig -a ; echo "any key to continue" ; read ;;
3) echo "kiss is all yours now! (type 'exit' to return the rbtui)" ; sh ; echo "hit any key to continue"
read ;;
2) echo "current RAM DISK & phisycal space is: " ; free ; df -a ; echo "hit any key to continue"
read ;;
4) echo "current DNS configuration is: " 
echo "type 'exit' to return the rbtui" ; sh | cat /etc/resolve.conf ; echo "hit any key to continue"
read ;;
5) echo "routing table is: " ; route -v ; echo "hit any key to continue" ; read ;; 
6) echo "current hosts configuration is: "
echo "type 'exit' to return the rbtui" ; sh | cat /etc/hosts ; echo "hit any key to continue"
read ;;
7) echo "whats the ip?" ; read ip ; ifconfig eth0 $ip
echo "whats the mask?" ; read mask ; ifconfig eth0 netmask $mask
echo "do you want to set a default gateway? [y/n]" ; read ans
if [ $ans = y -o $ans = Y ]; then
echo "whats the default gateway?" ; read dg ; route add default gw $dg
else
echo "press any key to return to menu"
fi ; read ;; 
9) echo "whats the hosts? example: 127.0.0.1 yourhost" ; read hosts ; echo "$hosts" > /etc/hosts
echo "hit any key to continue" ; read ;;
8) echo "whats the name server?" ; read ns ; echo "nameserver $ns" > /etc/resolv.conf 
echo "hit any key to continue" ; read ;; 
11) echo "mapping the ramdrive..." ; mkfs /dev/ram1 ; mount /dev/ram1 /mnt ; read ;; 
10) echo "system information: " ; echo "user: $USER shell: $TERM home: $HOME" ; read ;; 
12) sh ; exit 0 ;;
*) echo "sorry... choose a number only between 1-12" ; echo "hit any key to continue..." ; read ;;
esac 

done
