#! /bin/sh
#
# @(#)setDEBUGLEVEL	1.4	LPS_UNX_COM	2/19/95
#
# Copyright 1993   Digital Equipment Corporation, Maynard, MA
#
# setDEBUGLEVEL
#
# A script that produces a value for attribute DEBUGLEVEL.
#
# Parameters:
#    $1 - LPS class identifier, one of {PC, MC, PS, ENV}
#    $2 - Operating system type identifier (eg: SV2, BSD, etc)
#    $3 - Print client type identifier (eg: AIX, BSD, SV3, etc)
#    $4 - PrintServer printer model (eg: LPS17, LPS20)
#    $5 - Default value for the attribute
#    $6 - Path of the output file to receive the final attribute value
#
# Global variables:
#    ECHON
#    FUNCS
#    TR    (for the checknumrange() function)
#
# Exit values:
#    0 - Success, output file contains newly set attribute value.
#    1 - Error or interruption occurred, error messages go to stderr,
#	 contents of the output file are undefined.
###

CLASS=$1
OSTYPE=$2
PCTYPE=$3
PSMODEL=$4
DEFVAL=$5
OUTFILE=$6

. $FUNCS   # Import the standard LPS shell functions

if [ "$CLASS" = "ENV" ]
then
   NOTES="
A typical site will choose the default response for this question."
fi



showhelp true "
What is the debug level?

Most PrintServer programs contain special debugging capabilities,
where extra information is written (typically to the program's log
file) according to the program's current \"debug level\" value.  The
debug level is essentially the same as the \"logging level\" option,
but is only for debugging purposes.

Similar to the logging level, a debug level is a nonnegative number,
with \"0\" as the minimum and \"9\" as the maximum level value.

The higher the debug level, the more verbose the log file becomes,
with a corresponding increase in disk space consumption.  Basic debug
information is obtained with a value of \"2\" or less, while
considerable debugging information is written when the debug level is
at a value of \"5\" or more.
$NOTES"

getlevel $DEFVAL "Debugging"

if [ -z "$RESPONSE" ]
then
    RESPONSE="$DEFVAL"
fi

echo "$RESPONSE" > $OUTFILE

exit 0
