Import Upstream version 1.8.5
[hcoop/debian/openafs.git] / src / afsinstall / lib / InstallGuides / sgi_63 / modkernel
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 SGI systems running IRIX 6.x
10 #
11
12 sub modkernel {
13 my($chip, $nfs, $libafs);
14 &ErrorsAreFatal(1);
15
16 # Find out what kind of chip the machine has (Rx000)
17 $chip = `hinv -t cpu`;
18 $chip =~ /R[51]0*/;
19 $chip = $&;
20 &ErrorMsg("Could not determine chip type with", "hinv") unless ($chip =~ /^R/);
21
22 # NFS support
23 if ($Configuration{"NFSEXTENSIONS"}) {
24 $nfs = ""; }
25 else {
26 $nfs = ".nonfs"; };
27
28 # From the above, put together the name of the kernel library to use
29 $libafs = "libafs.SP.$chip$nfs.o";
30
31 &CreateDir("/usr/vice/etc/sgiload");
32 &ErrorsAreFatal(0);
33
34 &Copy("root.client/usr/vice/etc/sgiload/$libafs", "/usr/vice/etc/sgiload");
35 &Copy("root.client/usr/vice/etc/sgiload/afs", "/usr/vice/etc/sgiload");
36 &Copy("root.client/usr/vice/etc/sgiload/afs.rc", "/usr/vice/etc/sgiload");
37 &Copy("root.client/usr/vice/etc/sgiload/afs.sm", "/usr/vice/etc/sgiload");
38
39 &Copy("root.client/usr/vice/etc/afsd", "/usr/vice/etc");
40 &Chmod(0744, "/usr/vice/etc/afsd");
41 system("/etc/chkconfig -f afsml on");
42 &Copy("bin/fs", "/usr/vice/etc/fs");
43 }