1 # Copyright 2000, International Business Machines Corporation and others.
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
8 # An InstallGuide for static kernel built libraries
9 # For Alpha systems running Digital Unix 3.x
15 if ($Configuration{"NFSEXTENSIONS"}) {
16 &Copy("root.client/bin/libafs.o", "/usr/sys/BINARY"); }
18 &Copy("root.client/bin/libafs.nonfs.o", "/usr/sys/BINARY/libafs.o"); };
20 &CreateDir("/usr/vice/etc");
21 &Copy("root.client/usr/vice/etc/afsd", "/usr/vice/etc");
22 &Chmod(0744, "/usr/vice/etc/afsd");
23 &Copy("bin/fs", "/usr/vice/etc/fs");
27 if (!-f "/usr/sys/conf/AFS") {
30 &Copy("/usr/sys/conf/$host", "/usr/sys/conf/AFS"); };
33 $FILES="/sys/conf/files";
34 $VFSCONF="/sys/vfs/vfs_conf.c";
36 &Patch::Verbose if ($InstallVerbose);
38 &Patch::FileOpen($AFS);
39 &Patch::FileOpen($FILES);
40 &Patch::FileOpen($VFSCONF);
42 $AFSSearchInsert = <<"xxENDxx";
46 $AFSNewInsert = <<"xxENDxx";
50 $AFSSearchReplace = "ident\\s+.+";
51 $AFSNewReplace = "ident\t\t\"AFS\"";
53 if (!&Patch::Patch($AFS, [[0, "Insert", $AFSSearchInsert, $AFSNewInsert],
54 [1, "Replace", $AFSSearchReplace, $AFSNewReplace]])) {
55 &ErrorMsg("Did not succeed with patch", $AFS);
58 $FILESSearch1 = "OPTIONS/nfs\\s.*";
59 $FILESNew1 = "OPTIONS/afs \t\t\toptional afs define_dynamic";
61 #$FILESSearch2 = "nfs/nfs3_server.c\\s.*";
62 #$FILESNew2 = << "xxENDxx";
63 #MODULE/afs optional afs Binary
64 #afs/libafs.c module afs
66 $FILESNew2 = "afs/libafs.c\t\t\toptional afs if_dynamic afs Binary";
68 #if (!&Patch::Patch($FILES, [[1, "Insert", $FILESSearch1, $FILESNew1],
69 # [1, "Insert", $FILESSearch2, $FILESNew2]])) {
70 # &ErrorMsg("Did not succeed with patch", $FILES);
72 if (!&Patch::Patch($FILES, [[1, "Insert", $FILESSearch1, $FILESNew1],
73 [0, "EOF", $FILESSearch2, $FILESNew2]])) {
74 &ErrorMsg("Did not succeed with patch", $FILES);
77 $VFSSearch1 = "#include <cdfs.h>";
78 $VFSNew1 = << "xxENDxx";
80 #if defined(AFS) && AFS
81 extern struct vfsops afs_vfsops;
87 $VFSSearch2 = << "xxENDxx";
88 (struct vfsops *)0, "", /* 13 = MOUNT_ADDON */
91 $VFSNew2 = << "xxENDxx";
95 (struct vfsops *)0, "", /* 13 = MOUNT_ADDON */
101 if (!&Patch::Patch($VFSCONF, [[0, "Replace", $VFSSearch1, $VFSNew1],
102 [0, "Replace", $VFSSearch2, $VFSNew2]])) {
103 &ErrorMsg("Did not succeed with patch", $VFSCONF);