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

vdir=$(dirname $0)

. $vdir/vasm-functions

check_root

#########################################################################
menuA()
{
while [ 0 ]; do
DIMENSION="18 58 6"
TITLE="INIT NETWORK CONFIGURATION"
TEXT="\n
This menu helps you to setup one or more inet scripts that will be
fired up during system initialization. Each inet may have different
network device and TCP/IP settings.\n
So please, select ADD, DEL, or SET as appropriate."

$DCMD --backtitle "$BACKTITLE" --title "$TITLE" --menu "$TEXT" $DIMENSION \
 "ADD" "Add an inet" \
 "DEL" "Delete an inet" \
 "SET" "Change an inet" \
 "START" "Start the network" \
 "STOP" "Stop the network" \
 "DONE" "bye bye inet configurator" \
 2> $freply

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

  case `cat $freply` in
      ADD) 
        $vdir/vinetadd
        ;;
      DEL)
        $vdir/vinetdel
        ;;
      SET)
        $vdir/vinetset
	;;
      START)
        $vdir/vinetstart
	;;
      STOP)
        $vdir/vinetstop
	;;
      *)
        return 0
	;;
    esac
done
}

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

menuA
