#! /bin/sh
#
# @(#)setOFFERACCT	1.3	LPS_UNX_COM	02/19/95
#
# Copyright 1993   Digital Equipment Corporation, Maynard, MA
#
# setOFFERACCT
#
# A script that produces a value for the MC-specific attribute OFFERACCT.
#
# NOTE:  This script is *not* designed for use with any class except MC.
#
# 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
#    PAGER
#
# 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

DESCRIPTION="`getobjdesc $CLASS`"

QUESTION="Offer Accounting Services"

showhelp true "
${QUESTION}?

A $DESCRIPTION can capture PrintServer printer accounting information and
store it in an associated accounting file.  The accounting information is
for all jobs printed on the printer, regardless of where the print job
originated on the network.

You can offer Accounting Services and specify the accounting file, and then
later disable the services -- while keeping the former accounting file
intact -- by simply reconfiguring the Client and answering \"No\" to this
question.  Later, when you wish to continue offering Accounting Services,
you can reconfigure the Client and re-enable the services by answering
\"Yes\" to this question.

When you configure a $DESCRIPTION using the \"step-by-step\" method
and answer \"No\" to this question, then you will not be requested
to enter the name of the accounting file.
"

if yesno $DEFVAL "$QUESTION"
then
    resp="Yes"
else
    resp="No"
fi

echo "$resp" > $OUTFILE

exit 0
