#! /bin/sh

# This script contains the code common to checkrun and runfactor listing
# all the useful environment variables you might want to set.

# A mail path back to SRC for orphaned OUT files.  You may want to change
# this to e.g., decsrc::factor or factor%src.dec.com@local.mail.router
MAILTO=${MAILTO-factor@src.dec.com}

# The local command for sending mail, both to you and to SRC
MAILCMD=${MAILCMD-mail}

# The user to whom to send mail when the TASKLIST is empty
MAILUSER=${MAILUSER-$USER}

# Whether to send mail when the TASKLIST is empty; set to "" to not send
DOMAIL=${DOMAIL-yes}

# directory for finding mutable files
FACTORDIR=${FACTORDIR-./mutable}; export FACTORDIR

# directory for output files (and working directory for mpqs)
OUTDIR=${OUTDIR-$FACTORDIR}; export OUTDIR

# location of template file
template=${template-$FACTORDIR/TEMPLATE}

# machine instance name; on a multiprocessor, make sure that you either
# use different directories for each process, or set (and export) MACH
# to distinct values.
MACH=${MACH-`hostname`}; export MACH

# log files -- set to /dev/null to suppress output
control=${control-$OUTDIR/log.$MACH.ctrl}; log=${log-$OUTDIR/log.$MACH}

# number of multiples of TICKLEN to pause when terminal activity detected
# set (and export) this to 0 in your environment to not pause at all
pausetty=${pausetty-1}

# devices examined to see if factoring should pause; other good things to
# inspect might include /dev/mouse and /dev/kbd
ttydevs=${ttydevs-"/dev/tty*"}

# load average above which to pause factoring, exluding factoring.
# on a multiprocessor, increase this enough to let all the copies run
pauseload=${pauseload-0.50}

# A ps command that takes a process id as a parameter; ps -p on System V.
PS=${PS-ps}

# command to suspend and resume a process.  If none (some System V),
# set PAUSECMD to kill and RESUMECMD to echo, or both to "echo" to
# ignore pausing.
PAUSECMD=${PAUSECMD-"kill -TSTP"}
RESUMECMD=${RESUMECMD-"kill -CONT"}

# amount of time to wait between checks of activity, in minutes; must be
# 1, 2, 5, or 10.
TICKLEN=${TICKLEN-5}; export TICKLEN

# A version of the 'link' command that generates an error if the
# file already exists: on System V, you probably want /etc/link
LN={$LN-ln}

