#!/bin/sh
# @vasm : USER
# @level: user
# @description: setup password and users  
# 
# (c) Eko M. Budi, 2003
# (c) Vector Linux, 2003
#
# Released under GNU GPL

vdir=$(dirname $0)

. $vdir/vasm-functions

check_root

#########################################################################
menuA()
{
while [ 0 ]; do
TITLE="NETWORK MENU"
TEXT="\n
This is the menu to setup networking system. For a basic\n
computer, NETCONF is the easiest way. For advance setup,\n
use the NAME menu then the INET or MODEM menu to set up\n
one or more network connections.\n
Meanwhile, if you want to setup this computer as a gateway,\n
use the INET menu to add more connections and the FIREWALL\n
menu to enable the internet sharing."
DIMENSION="22 70 7"

# Additionally, you may\n
# use the DNS and DHCP menu to manage the TCP/IP naming and\n
# addressing for your intranet."

$DCMD --backtitle "$BACKTITLE" --title "$TITLE" --menu "$TEXT" $DIMENSION \
"NETCONF" "quick configuration for a standard computer" \
"NAME" "set hostname and DNS server" \
"INET" "set network interfaces" \
"MODEM" "set modem & PPP password" \
"FIREWALL" "set network protection and internet sharing" \
"EXIT" "exit this menu nicely" \
2> $freply

#"DNS"  "manage hosts to IP address mappings" \
#"DHCP" "manage dynamic IP address allocations"  \

   [ $? != 0 ] && return 1

   case `cat $freply` in
      NETCONF)
        $vdir/vnetconf
	;;
      NAME)
        $vdir/vnameset
        ;;
      INET)
        $vdir/vinet
        ;;
      MODEM)
        $vdir/vmodemset
        ;;
      FIREWALL)
        $vdir/vfirewall
	;;
      DNS)
        $vdir/vdns
	;;
      DHCP)
        $vdir/vdhcp
	;;
      EXIT)
        return 0
	;;
    esac
  done
}

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

menuA
clean_exit $?

