#! /bin/sh
#
# @(#)setLPSUSR	1.2	LPS_UNX_COM	2/19/95
#
# Copyright 1995   Digital Equipment Corporation, Maynard, MA
#
# setLPSUSR
#
# A script that produces a value for attribute LPSUSR.
#
# 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
#    TMPDIR
#
# 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 "
In what directory should user programs reside?

The LPS software includes a number of programs for use by unprivileged
users, such as the \"lpspr\" print utility and the \"lpsrc\" Remote
Console utility, and related X Window programs.

These programs should reside in a generally known and accessible
system directory, typically one which is defined as part of the
default value for the PATH shell variable.

It is strongly recommended that you choose the default value for this
directory, as the recommended default is the most common directory for
this type of software, one that is almost always defined within a
typical user's PATH variable.

If you do not accept the default path value, then you must inform your
users of the path of the directory used to contain these user
programs.

You should also note that copies of these user programs are also
stored in the system program directory ($ENV_LPSBIN)."

getpath d "$DEFVAL" "User programs directory"

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

echo "$RESPONSE" > $OUTFILE

exit 0
