Import Upstream version 1.8.5
[hcoop/debian/openafs.git] / src / afsinstall / lib / InstallGuides / GENERIC / rc
1 # Copyright 2000, International Business Machines Corporation and others.
2 # All Rights Reserved.
3 #
4 # This software has been released under the terms of the IBM Public
5 # License. For details, see the LICENSE file in the top-level source
6 # directory or online at http://www.openafs.org/dl/license10.html
7
8 # An InstallGuide for AFS startup scripts
9 #
10
11 sub rc {
12 &ErrorsAreFatal(1);
13 $rc = open(RC, ">> /etc/rc.afs");
14 &ErrorMsg("Can't append to file", "/etc/rc.afs") if (!$rc);
15 print RC <<"EORC";
16 #!/bin/sh
17 #
18
19 EORC
20 close(rc);
21 &Appendrc;
22 }
23
24 sub Appendrc {
25 my($rmtsys, $otherrmtsys);
26 &ErrorsAreFatal(1);
27
28 if ($Configuration{"NFSEXTENSIONS"}) {
29 $rmtsys = "-rmtsys";
30 $otherrmtsys = ""; }
31 else {
32 $otherrmtsys = "-rmtsys";
33 $rmtsys = ""; };
34
35 $rc = open(RC, ">> /etc/rc.afs");
36 &ErrorMsg("Can't append to file", "/etc/rc.afs") if (!$rc);
37 print RC <<"EORC";
38 # Choose one depending on how much usage this client gets
39 #OPTIONS="-stat 300 -dcache 100 -daemons 2 -volumes 50"
40 OPTIONS="-stat 2000 -dcache 800 -daemons 3 -volumes 70"
41 #OPTIONS="-stat 2800 -dcache 2400 -daemons 5 -volumes 128"
42
43 # Choose one depending on if you want this machine to be an NFS Translator
44 NFS="$rmtsys"
45 #NFS="$otherrmtsys"
46
47 # Start bosserver
48 if [ -x /usr/afs/bin/bosserver ]; then
49 echo 'Starting bosserver' > /dev/console
50 /usr/afs/bin/bosserver &
51 fi
52
53 # Start afsd
54 /usr/vice/etc/afsd \$OPTIONS \$NFS
55
56 # Start AFS inetd services
57 if [ -f /etc/inetd.afs -a -f /etc/inetd.conf.afs ]; then
58 /etc/inetd.afs /etc/inetd.conf.afs
59 fi
60
61 EORC
62 close(RC);
63 }