cf: Disable swig if shared libraries are disabled
[openafs.git] / src / afsinstall / lib / InstallGuides / RS_AIX3x / 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 installing the initialization script
9 # For IBM RS/6000 systems running AIX 3.x
10 #
11
12 sub AIXrc {
13
14 # Defaults
15 $rcfile   = "/etc/rc.afs";
16 $initfile = "/etc/inittab";
17
18 &ErrorsAreFatal(1);
19
20 # Add AFS kernel loader to RC file
21 &VPrint("Creating $rcfile file");
22 &DisplaceFile($rcfile);
23 $rc = open(RC, "> $rcfile");
24 &ErrorMsg("Could not overwrite", $rcfile) if (!$rc);
25
26 print RC <<"EORC";
27 #!/bin/sh
28
29 USENFS=\"$Configuration{"NFSEXTENSIONS"}\"
30
31 if [ \"\$NFS\" = 1 ]; then
32   ExportExt=\"\"
33   AFSExt=\".trans\"
34 else
35   ExportExt=\".nonfs\"
36   AFSExt=\"\"
37 fi
38
39 # Load AFS into the kernel
40 /usr/vice/etc/dkload/cfgexport -a /usr/vice/etc/dkload/export.ext\${ExportExt}
41 /usr/vice/etc/dkload/cfgafs -a /usr/vice/etc/dkload/afs.ext\${AFSExt}
42
43 EORC
44 close(RC);
45
46 # Append the generic RC file
47 &ReadInstallGuide("$InstallGuideDir/GENERIC/rc");
48 &Appendrc;
49
50 # Add AFS entry to the inittab file
51 &VPrint("Adding AFS entry to $initfile");
52
53 &Patch::Verbose if ($InstallVerbose);
54 &Patch::FileOpen($initfile);
55 $SearchString = <<"xxENDxx";
56 rcnfs:2:wait:/etc/rc.nfs > /dev/console 2>&1 # Start NFS Daemons
57 xxENDxx
58
59 $NewString = <<"xxENDxx";
60 rcafs:2:wait:/etc/rc.afs > /dev/console 2>&1 # Start AFS daemons
61 xxENDxx
62
63 if (!&Patch::Patch($initfile, [[0, "Insert", $SearchString, $NewString]])) {
64   &ErrorMsg("Did not succeed with patch", $initfile);  }
65 }
66
67
68
69
70 sub rc {
71 goto &AIXrc;
72 }