From: gavin@coombs.anu.edu.au (Gavin)
Subject: A working CAP setup for SunOS 4.1.1 with enet or nit interfaces
Keywords: CAP 6.0 pl 100
Organisation: Research School of Social Sciences, Australian National University
Reply-To: gavin@coombs.anu.edu.au (Gavin Longmuir)
Organization: Computer Services Centre, Australian National University
Date: 14 Apr 92 01:03:27 GMT

Ok, this is only for those people who are unsure about the setup of CAP
on a Sun System.

~capsrc/m4.features
---
# m4.features
#
# This file is used to determine the default set of additional features
# that will be incorporated into CAP. These features have been contributed
# by many people throughout the network community.
#
# Necessary preamble - please don't alter
define(`concat',$1$2$3$4$5$6$7$8$9)
define(`specialcflags',`')
define(`aufsosflags',`')
define(`simpleflags',`')
define(`lwflags',`')
#
# To change the feature set, simply uncomment the wanted defines().
# The Configure file will then use the customised version.
# For more details, refer to the file 'CAP60.README'
#
# + SHORT_NAMES adds short name support to AUFS for AppleShare PC.
define(`specialcflags',concat(specialcflags,` -DSHORT_NAMES'))
#
# + NOCASEMATCH removes UNIX case sensitivity in AUFS (like Macs).
define(`specialcflags',concat(specialcflags,` -DNOCASEMATCH'))
#
# + SIZESERVER adds a daemon per AUFS server process for volume size info.
define(`specialcflags',concat(specialcflags,` -DSIZESERVER'))
#
# + LWSRV_AUFS_SECURITY provides printer security based on AUFS connection.
define(`specialcflags',concat(specialcflags,` -DLWSRV_AUFS_SECURITY'))
#
# + LWSRV_LPR_LOG causes stdout/stderr lpr output to be included in lwsrv log
# define(`specialcflags',concat(specialcflags,` -DLWSRV_LPR_LOG'))
#
# + AUTHENTICATE turn on alternate AUFS/LWSRV authentication method
# define(`specialcflags',concat(specialcflags,` -DAUTHENTICATE'))
#
# + STAT_CACHE causes critical AUFS stat() calls to be cached.
define(`specialcflags',concat(specialcflags,` -DSTAT_CACHE'))
#
# + TREL_TIMEOUT causes an extra TREL timeout listener to run to avoid timeouts
define(`specialcflags',concat(specialcflags,` -DTREL_TIMEOUT'))
#
# + RUTGERS includes local modifications for Rutgers University
# define(`specialcflags',concat(specialcflags,` -DRUTGERS'))
#
# + MELBOURNE includes local modifications for Melbourne University
# define(`specialcflags',concat(specialcflags,` -DMELBOURNE'))
#
# + USE_HOST_ICON provides automatic aufs ICON selection on supported hosts
define(`specialcflags',concat(specialcflags,` -DUSE_HOST_ICON'))
define(`specialcflags',concat(specialcflags,` -DUSE_ALT_ICONS'))
#
# + PERMISSIVE_USER_NAME allows AUFS users to have their real name in Chooser
define(`specialcflags',concat(specialcflags,` -DPERMISSIVE_USER_NAME'))
#
# + ULTRIX_SECURITY adds ULTRIX enhanced security to aufs
# define(`specialcflags',concat(specialcflags,` -DULTRIX_SECURITY'))
#
# + USE_MAC_DATES maintains Mac Create/Modify dates on file copy
define(`specialcflags',concat(specialcflags,` -DUSE_MAC_DATES'))
#
# + DEV_NIT specifies alternate NIT device name (default "/dev/nit")
# define(`specialcflags',concat(specialcflags,` -DDEV_NIT=\"/dev/nit\"'))
#
# + APPLICATION_MANAGER control the use of designated applications
define(`specialcflags',concat(specialcflags,` -DAPPLICATION_MANAGER'))
#
# + AUFS_README links readme file into new user's top level
define(`specialcflags',concat(specialcflags,` -DAUFS_README'))
#
# + ULT42PFBUG unpatched ULTRIX 4.2 packet filter workaround (also need COPYALL)
# define(`specialcflags',concat(specialcflags,` -DULT42PFBUG'))
#
# + AUFS_IDLE_TIMEOUT will disconnect idle AUFS sessions (-[i|I] period)
define(`specialcflags',concat(specialcflags,` -DAUFS_IDLE_TIMEOUT'))
#
# + REREAD_AFPVOLS kill -USR1 will make parent aufs re-read system vols file
# define(`specialcflags',concat(specialcflags,` -DREREAD_AFPVOLS'))
#
# + PASS_THRU pass through LWSRV jobs with no adobe preprocessing (for PCs)
define(`specialcflags',concat(specialcflags,` -DPASS_THRU'))
#
# + XDEV_RENAME allow files to be moved over cross device links
# define(`specialcflags',concat(specialcflags,` -DXDEV_RENAME'))
#
#
#
# AUFS definable options (previously required editing m4.setup)
#
# + NONLXLATE for aufs
# define(`aufsosflags',concat(aufsosflags,` -DNONLXLATE'))
#
# + FULL_NCS_SUPPORT (National Character Support) for aufs
# define(`aufsosflags',concat(aufsosflags,` -DFULL_NCS_SUPPORT'))
#
# + GGTYPE="gid_t" (group ID type) for AUFS
# define(`aufsosflags',concat(aufsosflags,` -DGGTYPE="gid_t"'))
#
# + NOCHGRPEXEC don't exec chgrp, just use chown(2) 3rd arg. [Not for Sys V]
# define(`aufsosflags',concat(aufsosflags,` -DNOCHGRPEXEC'))
#
# + USEDIRSETGID set group ID bit on non-primary group dirs [SunOS/Sys V]
# define(`aufsosflags',concat(aufsosflags,` -DUSEDIRSETGID'))
#
# + NETWORKTRASH fix permissions on network trash stuff
define(`aufsosflags',concat(aufsosflags,` -DNETWORKTRASH'))
#
#
#
# LWSRV definable options (previously required editing m4.setup)
#
# + LPRARGS passes arguments on lwsrv command line directly to lpr
# define(`lwflags',concat(lwflags,` -DLPRARGS'))
#
# + DOCNAME adds document name as a part of job name to lpr
define(`lwflags',concat(lwflags,` -DDOCNAME'))
#
# + PAGECOUNT adds page count to job name (value is internal buffer size)
# define(`lwflags',concat(lwflags,` -DPAGECOUNT=512'))
# define(`simpleflags',concat(simpleflags,` -DPAGECOUNT=512'))
#
# + ADOBE_DSC2_CONFORMANT forces Adobe DSC2 conformance
# define(`simpleflags',concat(simpleflags,` -DADOBE_DSC2_CONFORMANT'))
#
---
/usr/local/lib/start-cap-servers
---
#!/bin/sh
### sample start servers file (copy to /usr/local/lib)
### start from '/etc/rc.local'

LOGd=/tmp/aufs.log
LOGf=/dev/null
CAP=/usr/local/cap
LIB=/usr/local/lib

#AUFSLWLOG="-X /tmp/cap/.sockets"
AUFSLWLOG=""
LWARGS="-a ${LIB}/adicts -f ${LIB}/LWFonts ${AUFSLWLOG}"
LWARGSII="-a ${LIB}/adicts -f ${LIB}/LWPlusFonts ${AUFSLWLOG}"

AUFSARGS="-l ${LOGd} -V /etc/atalkvols -U 40 -A /etc/monitor -r /etc/cap.readme ${AUFSLWLOG}"
AUFSGARGS="-l ${LOGf} -V /etc/atalkvols.g -U 15 -G common -i 15"
#
# Start aarpd first for Native EtherTalk
#
nice --5 ${CAP}/aarpd "le0" "Coombs"

#
# allow atis to startup before other CAP programs
#
nice --5 ${CAP}/atis

#
# Make this 15 seconds if using aarpd
#
sleep 15

nice --5 ${CAP}/asyncad

if [ -f ${LOGd} ] ; then
	rm -f ${LOGd}
fi

nice --5 ${CAP}/aufs -n "Sorokin" ${AUFSARGS}
nice -5 ${CAP}/aufs -n "Sorokin Guest" ${AUFSGARGS}

${CAP}/macuser manager gavin doug
${CAP}/snitch -S -f "SUN SparcStation 1+ SunOS 4.1.1" -l lwsrv
${CAP}/timelord -n "Sorokin Clock"

nice --5 ${CAP}/lwsrv -n "Graunt Mac Spooler" -p lw.graunt ${LWARGS}
nice --5 ${CAP}/lwsrv -n "Graunt PC Spooler" -P -p grauntPC ${LWARGS}
nice --5 ${CAP}/lwsrv -n "Malthus Mac Spooler" -p lw.malthus ${LWARGS}
nice --5 ${CAP}/lwsrv -n "Malthus PC Spooler" -P -p malthusPC ${LWARGS}
nice --5 ${CAP}/lwsrv -n "Sociology Mac Spooler" -p lw.soc ${LWARGS}
nice --5 ${CAP}/lwsrv -n "Sociology PC Spooler" -P -p socPC ${LWARGS}
---
/etc/printcap
---
# Enable Printing on Demography LaserWriter "malthus"
malthus|lw.malthus|Malthus LaserWriter:\
	:lp=/var/spool/lpd/malthus.log:\
	:sd=/var/spool/lpd/malthuslp:\
	:pw#85:pl#73:sf:\
	:af=/var/adm/lpd_acct:\
	:lf=/var/adm/lpd_errs:\
	:if=/usr/local/lib/psif.malthus:
malthusPC|Malthus LaserWriter:\
	:lp=/var/spool/lpd/malthus.log:\
	:sd=/var/spool/lpd/malthuslp:\
	:pw#85:pl#73:sf:\
	:af=/var/adm/lpd_acct:\
	:lf=/var/adm/lpd_errs:\
	:if=/usr/local/lib/psif.malthusPC:
# Enable Printing on Demography LaserWriter II NT "graunt"
graunt|lw.graunt|Graunt LaserWriter:\
	:lp=/var/spool/lpd/graunt.log:\
	:sd=/var/spool/lpd/grauntlp:\
	:pw#85:pl#73:sf:\
	:af=/var/adm/lpd_acct:\
	:lf=/var/adm/lpd_errs:\
	:if=/usr/local/lib/psif.graunt:
grauntPC|Graunt LaserWriter:\
	:lp=/var/spool/lpd/graunt.log:\
	:sd=/var/spool/lpd/grauntlp:\
	:pw#85:pl#73:sf:\
	:af=/var/adm/lpd_acct:\
	:lf=/var/adm/lpd_errs:\
	:if=/usr/local/lib/psif.grauntPC:
# Enable Printing on Sociology LaserWriter "Sociology"
soc|lw.soc|Sociology LaserWriter:\
	:lp=/var/spool/lpd/soc.log:\
	:sd=/var/spool/lpd/soclp:\
	:pw#85:pl#73:sf:\
	:af=/var/adm/lpd_acct:\
	:lf=/var/adm/lpd_errs:\
	:if=/usr/local/lib/psif.soc:
socPC|Sociology LaserWriter:\
	:lp=/var/spool/lpd/soc.log:\
	:sd=/var/spool/lpd/soclp:\
	:pw#85:pl#73:sf:\
	:af=/var/adm/lpd_acct:\
	:lf=/var/adm/lpd_errs:\
	:if=/usr/local/lib/psif.socPC:
---
/usr/local/lib/psif.malthus
---
#! /bin/csh -fb
#
# sample line printer filter for the laserwriter
#

umask 0
set name="lwsrv spooler"
set host="sorokin"

top:
	if ($#argv > 0) then
		switch ($argv[1])
		case -n:
			shift argv
			if ($#argv > 0) then
				set name = $argv[1]
				shift argv
			endif
			goto top
		case -h:
			shift argv
			if ($#argv > 0) then
				set host = $argv[1]
				shift argv
			endif
			goto top
		default:

			shift argv
			goto top
		endsw
	endif

echo "Printing Postscript" > /var/spool/lpd/malthuslp/status
cat | /usr/local/cap/papif -p lw.malthus -n "$name" -h "$host"

exit(0)
---
/usr/local/lib/psif.malthusPC
---
#! /bin/csh -fb
#
# sample line printer filter for the laserwriter
#

umask 0
set name="lwsrv spooler"
set host="sorokin"

top:
	if ($#argv > 0) then
		switch ($argv[1])
		case -n:
			shift argv
			if ($#argv > 0) then
				set name = $argv[1]
				shift argv
			endif
			goto top
		case -h:
			shift argv
			if ($#argv > 0) then
				set host = $argv[1]
				shift argv
			endif
			goto top
		default:

			shift argv
			goto top
		endsw
	endif

echo "Printing Postscript" > /var/spool/lpd/malthuslp/status
tr -d '

exit(0)
---
/etc/etalk.local
---
#
# EtherTalk dynamic configuration data
#
# Last update:	Tue Apr 14 04:09:29 1992
#
# Generated by Native EtherTalk (Phase 2)
#
interface   	"le0"
netRangeStart	 0.01
netRangeEnd 	 0.04
thisNet     	 0.01
thisNode    	12
thisZone    	"Coombs"
bridgeNet   	 0.03
bridgeNode  	39
bridgeIP    	127.0.0.1
nisNet      	 0.01
nisNode     	12
asyncNet    	 0.02
asyncZone   	"Coombs Serial"
---
/etc/cap.printers
---
lw.malthus=Malthus:LaserWriter@Coombs RSSS
lw.graunt=Graunt:LazerWriter@Coombs RSSS
lw.soc=Sociology :LaserWriter@Coombs RSSS
---
+++
--
       *                    Gavin Longmuir - General Dog's Body and Programmer
    *    *              Demography Program, Research School of Social Sciences
       *                   Australian National University, Canberra, AUSTRALIA
 Voice: +61 6 249 0530  FAX: +61 6 257 1893  InterNet: gavin@coombs.anu.edu.au        *     UUCP: {uunet,ubc-vision,ukc,prlb2}!munnari!coombs.anu.edu.au!gavin