#! /bin/sh
#
# @(#)setPCLDEFAULTS	1.4	LPS_UNX_COM	2/19/95
#
# Copyright 1994   Digital Equipment Corporation, Maynard, MA
#
# setPCLDEFAULTSFILE
#
# A script that produces a value for attribute PCLDEFAULTSFILE.
#
# 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
#    PAGER
#    TR
#
# 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

showhelp true "
What is the path for the PCL defaults file?

The PCL defaults file is used to customize the PCL environment
for a PrintServer printer capable of interpreting the PCL language.
If this file exists, it is loaded into the printer at boot time.

This file is only applicable for PrintServer 17 models for Version 5.0
of this release of the software.  PrintServer 20 and PrintServer 32
models will be supported in the next software release.  If you are
configuring either a PrintServer 20 or PrintServer 32 printer, then
simply press RETURN when prompted.

For more information about this file, please refer to the
Management Guide.
"
export ECHON PAGER TR

getpath f "$DEFVAL" "PCL defaults file"

if [ $? -eq 2 ]
then
    exit 1
fi

echo "$RESPONSE" > $OUTFILE

exit 0
