Import Upstream version 1.8.5
[hcoop/debian/openafs.git] / src / afsinstall / lib / InstallGuides / SUN4x_5x / modkernel
CommitLineData
805e021f
CE
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 dynamic kernel loaded libraries
9# For Sun systems running Solaris 5.x
10#
11
12sub modkernel {
13&ErrorsAreFatal(1);
14&CreateDir("/usr/vice/etc/modload");
15&ErrorsAreFatal(0);
16
17if ($Configuration{"NFSEXTENSIONS"}) {
18 &Copy("root.client/usr/vice/etc/modload/libafs.o","/kernel/fs/afs"); }
19else {
20 &Copy("root.client/usr/vice/etc/modload/libafs.nonfs.o",
21 "/kernel/fs/afs"); }
22
23&Copy("root.client/usr/vice/etc/modload/afs.rc", "/usr/vice/etc/modload");
24&Copy("root.client/usr/vice/etc/afsd", "/usr/vice/etc");
25&Chmod(0744, "/usr/vice/etc/afsd");
26
27&Copy("bin/fs", "/usr/vice/etc/fs");
28# add the afs line to /etc/name_to_sysnum
29&ErrorsAreFatal(1);
30$File="/etc/name_to_sysnum";
31
32&Patch::Verbose if ($InstallVerbose);
33&Patch::FileOpen($File);
34
35$SearchString = <<"xxENDxx";
36fstatvfs 104
37nfs 106
38xxENDxx
39
40$NewString = <<"xxENDxx";
41fstatvfs 104
42afs 105
43nfs 106
44xxENDxx
45
46if (!&Patch::Patch($File, [[0, "Replace", $SearchString, $NewString]])) {
47 &ErrorMsg ("Did not succeed with patch", $File);
48}
49
50}