host.rc
author Claus Gittinger <cg@exept.de>
Sat, 01 Jun 1996 00:34:12 +0200
changeset 119 1f4f557d14a4
parent 103 9f5c03497b38
child 123 a974136fe017
permissions -rw-r--r--
*** empty log message ***

"*
 * $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' errorPrintNewline.
] ifFalse:[
    "if there is a corresponding file ..."

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

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