#!/bin/sh
# VASM
# VLocity Linux System Menu
# 
# (c) VLocity Linux, 2003

vdir=`dirname $0`

. $vdir/vasm-functions

check_root

menuA() {

while [ 1 ]; do
TITLE="SERVICES MENU"
TEXT="\n
This menu setup various services. A service is a\n
background program that perform a specific task,\n
including ssh, cups, also samba server.\n\n
Select the menu you wish:"

$DCMD --backtitle "$BACKTITLE" --title "$TITLE" \
--menu "$TEXT" 19 60 6 \
"BOOTSET" "set default run level for booting" \
"INITSET" "select initialization method" \
"HWSET"  "enable hardware initialization" \
"SRVSET"  "enable services for each run level" \
"CUPSWEB"  "configure CUPS printing" \
"SAMBAWEB" "configure SAMBA file/printer sharing" \
"DONE" "enough with this menu" \
 2> $freply

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

  REPLY=`cat $freply`
  case "$REPLY" in
    "SRVSET")
      $vdir/vsrvset
      ;;
    "HWSET")
      $vdir/vhwset
      ;;
    "BOOTSET")
      $vdir/vbootset
      ;;
    "INITSET")
      $vdir/vinitset
      ;;
    "CUPSWEB")
      $vdir/vcupsweb
      ;;
    "SAMBAWEB")
      $vdir/vsambaweb
      ;;
    *)
      clean_exit 0
  esac
done
}

###########################
# MAIN

menuA
clean_exit $?

