host.rc
author Claus Gittinger <cg@exept.de>
Mon, 15 Jul 1996 17:07:08 +0200
changeset 123 a974136fe017
parent 119 1f4f557d14a4
child 165 bb77927038c7
permissions -rw-r--r--
startup infoPrinting suppressable (-q flag)

"*
 * $Header$
 *
 * DONT add site specific things here - use your own h_xxx.rc file instead
 * where xxx stands for your hostname(s)
 *
 * startup configuration for host specific stuff -
 * looks for a host specific init file and loads it.
 *"

|host domain s|

(OperatingSystem getSystemType = 'hpux') ifTrue:[
    OperatingSystem disableSignal:(OperatingSystem sigALRM)
].

domain := OperatingSystem getDomainName.
(domain = 'axept.de'
 or:[domain = 'exept.de']) ifTrue:[
    PostscriptPrinterStream defaultCommands:#(
				    'cat | rsh ibm lpr -h'
				    'cat > preview.ps'
				    'cat > preview.ps; ghostview preview.ps'
			     ).
    PostscriptPrinterStream printCommand:'cat | rsh ibm lpr -h'.
    Printer := PostscriptPrinterStream.

    PrinterStream defaultCommands:#(
				    'cat | rsh ibm lpr -h'
				    'a2ps | rsh ibm lpr -h'
				    'a2ps > preview.ps; ghostview preview.ps'
			     ).
    PrinterStream printCommand:'cat | rsh ibm lpr -h'.
].

host := OperatingSystem getHostName.
host isNil ifTrue:[
    'cannot determine host I am running on' errorPrintCR.
] ifFalse:[
    "if there is a corresponding file ..."

    (Smalltalk at:#'_ImageHostName') ~= host ifTrue:[
	('trying host setup h_' , host , '.rc ...') infoPrintCR.

	s := Smalltalk systemFileStreamFor:('h_' , host , '.rc').
	s notNil ifTrue:[
	    s fileIn.
	    s close.
	].
	Smalltalk at:#'_ImageHostName' put:host.
    ]
].
!