author | Claus Gittinger <cg@exept.de> |
Sat, 09 Nov 1996 02:03:57 +0100 | |
changeset 169 | 08055578224e |
parent 165 | bb77927038c7 |
child 177 | eec6bac738ba |
permissions | -rw-r--r-- |
0 | 1 |
"* |
2 |
* $Header$ |
|
5 | 3 |
* |
4 |
* DONT add site specific things here - use your own h_xxx.rc file instead |
|
8 | 5 |
* where xxx stands for your hostname(s) |
5 | 6 |
* |
0 | 7 |
* startup configuration for host specific stuff - |
8 |
* looks for a host specific init file and loads it. |
|
9 |
*" |
|
10 |
||
103
9f5c03497b38
example - checking for the domain
Claus Gittinger <cg@exept.de>
parents:
8
diff
changeset
|
11 |
|host domain s| |
0 | 12 |
|
165 | 13 |
"/ on some systems, paging in is so slow, that a SIGALRM |
14 |
"/ arrives too early to be handled correctly |
|
15 |
"/ (I guess, this is my fault somewhere ... ;-) |
|
16 |
"/ |
|
17 |
"/ This can be worded around by disabling the timer here. |
|
18 |
"/ (The sceduler will reenable it later) |
|
19 |
||
5 | 20 |
(OperatingSystem getSystemType = 'hpux') ifTrue:[ |
21 |
OperatingSystem disableSignal:(OperatingSystem sigALRM) |
|
22 |
]. |
|
23 |
||
165 | 24 |
"/ |
25 |
"/ setup the printer stuff. |
|
26 |
"/ the commands below will be offered in the printer-setting box |
|
27 |
"/ |
|
169 | 28 |
PostscriptPrinterStream notNil ifTrue:[ |
29 |
PostscriptPrinterStream |
|
30 |
defaultCommands:#( |
|
31 |
'lpr -h' |
|
32 |
'cat | rsh <hostname> lpr -h' |
|
33 |
'cat > preview.ps' |
|
34 |
'cat > preview.ps; ghostview preview.ps' |
|
35 |
). |
|
36 |
PostscriptPrinterStream printCommand:'lpr'. |
|
37 |
]. |
|
165 | 38 |
|
169 | 39 |
PrinterStream notNil ifTrue:[ |
40 |
PrinterStream |
|
41 |
defaultCommands:#( |
|
42 |
'lpr -h' |
|
43 |
'cat | rsh <hostname> lpr -h' |
|
44 |
'a2ps | rsh <hostname> lpr -h' |
|
45 |
'a2ps > preview.ps; ghostview preview.ps' |
|
46 |
). |
|
47 |
Printer := PrinterStream. |
|
48 |
PrinterStream printCommand:'lpr'. |
|
49 |
]. |
|
165 | 50 |
|
51 |
"/ Printer := PostscriptPrinterStream. |
|
52 |
||
53 |
"/ in our home-domain, preset the print command for remote printing |
|
54 |
"/ on a host called 'ibm'. |
|
55 |
"/ You can change this for your environment and/or make it |
|
56 |
"/ unconditional. |
|
57 |
||
103
9f5c03497b38
example - checking for the domain
Claus Gittinger <cg@exept.de>
parents:
8
diff
changeset
|
58 |
domain := OperatingSystem getDomainName. |
165 | 59 |
(domain = 'xaxept.de' or:[domain = 'exept.de']) ifTrue:[ |
60 |
PostscriptPrinterStream printCommand:'cat | rsh ibm lpr -h'. |
|
61 |
PrinterStream printCommand:'cat | rsh ibm lpr -h'. |
|
119 | 62 |
PostscriptPrinterStream defaultCommands:#( |
63 |
'cat | rsh ibm lpr -h' |
|
103
9f5c03497b38
example - checking for the domain
Claus Gittinger <cg@exept.de>
parents:
8
diff
changeset
|
64 |
'cat > preview.ps' |
9f5c03497b38
example - checking for the domain
Claus Gittinger <cg@exept.de>
parents:
8
diff
changeset
|
65 |
'cat > preview.ps; ghostview preview.ps' |
9f5c03497b38
example - checking for the domain
Claus Gittinger <cg@exept.de>
parents:
8
diff
changeset
|
66 |
). |
119 | 67 |
PrinterStream defaultCommands:#( |
68 |
'cat | rsh ibm lpr -h' |
|
69 |
'a2ps | rsh ibm lpr -h' |
|
70 |
'a2ps > preview.ps; ghostview preview.ps' |
|
71 |
). |
|
103
9f5c03497b38
example - checking for the domain
Claus Gittinger <cg@exept.de>
parents:
8
diff
changeset
|
72 |
]. |
9f5c03497b38
example - checking for the domain
Claus Gittinger <cg@exept.de>
parents:
8
diff
changeset
|
73 |
|
165 | 74 |
"/ |
75 |
"/ try host-specific setup |
|
76 |
"/ (h_<hostname>.rc |
|
77 |
"/ |
|
0 | 78 |
host := OperatingSystem getHostName. |
2 | 79 |
host isNil ifTrue:[ |
123
a974136fe017
startup infoPrinting suppressable (-q flag)
Claus Gittinger <cg@exept.de>
parents:
119
diff
changeset
|
80 |
'cannot determine host I am running on' errorPrintCR. |
2 | 81 |
] ifFalse:[ |
0 | 82 |
"if there is a corresponding file ..." |
103
9f5c03497b38
example - checking for the domain
Claus Gittinger <cg@exept.de>
parents:
8
diff
changeset
|
83 |
|
5 | 84 |
(Smalltalk at:#'_ImageHostName') ~= host ifTrue:[ |
123
a974136fe017
startup infoPrinting suppressable (-q flag)
Claus Gittinger <cg@exept.de>
parents:
119
diff
changeset
|
85 |
('trying host setup h_' , host , '.rc ...') infoPrintCR. |
5 | 86 |
|
8 | 87 |
s := Smalltalk systemFileStreamFor:('h_' , host , '.rc'). |
88 |
s notNil ifTrue:[ |
|
89 |
s fileIn. |
|
90 |
s close. |
|
91 |
]. |
|
92 |
Smalltalk at:#'_ImageHostName' put:host. |
|
0 | 93 |
] |
94 |
]. |
|
95 |
! |