#!/bin/sh
# @vasm : FSMEN
# @level: user
# @description: file system menu
# 
# (c) Eko M. Budi, 2004
# (c) VLocity Linux, 2004
#
# Released under GNU GPL

VDIR=$(dirname $0)

. $VDIR/vasm-functions

check_root

menu_fs()
{
while [ 1 ]; do
  DIMENSION="17 56 6"
  TITLE="FILE SYSTEM MENU"
  TEXT="\n
This menu allows you to configure harddisk and file system.
Please select what do you want to do:"

$DCMD --backtitle "$BACKTITLE" --title "$TITLE" --menu "$TEXT" $DIMENSION \
 "FDISK"  "Launch harddisk partitions utility" \
 "FORMAT" "Format a partition" \
 "MOUNT"  "Mount partitions on boot time" \
 "LILO"   "Set LILO Linux Loader" \
 "BACKUPSYS" "Set backup for system files" \
 "DONE"   "finish for now" \
 2> $freply

   status=$?
   [ $status != 0 ] && return $status

    case `cat $freply` in
      BACKUPSYS)
        $VDIR/vbackupsys
	;;
      MOUNT)
        $VDIR/vmount
	;;
      FORMAT)
        $VDIR/vformat
	;;
      LILO)
        $VDIR/vliloconf-fixmbr
        ;; 
      FDISK) 
        $VDIR/vfdisk
        ;;
      *)
        clean_exit 0
	;;
    esac
 done
}

####################################################################################
# MAIN PROGRAM

wizard menu_fs
return $?
