Import Upstream version 1.8.5
[hcoop/debian/openafs.git] / src / afsinstall / lib / InstallGuides / SGI_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 SGI systems running IRIX 5.x
10#
11
12sub modkernel {
13my ($chip, $chipcount, $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[34][046]0*/;
19$chip = $&;
20$chip =~ s/5/4/;
21&ErrorMsg("Could not determine chip type with", "hinv") unless ($chip =~ /^R/);
22
23# Find out if there is more than one processor (eg "2 150 MHZ IP19 Processors")
24$chipcount = `hinv -c processor`;
25$chipcount =~ s/ .*//;
26&ErrorMsg("Could not determine chip count with", "hinv") unless ($chipcount);
27
28# NFS support
29if ($Configuration{"NFSEXTENSIONS"}) {
30 $nfs = ""; }
31else {
32 $nfs = ".nonfs"; };
33
34# From the above, put together the name of the kernel library to use
35$libafs = "libafs.SP.$chip$nfs.o" if ($chipcount == 1);
36$libafs = "libafs.MP.$chip$nfs.o" if ($chipcount > 1);
37
38&CreateDir("/usr/vice/etc/sgiload");
39&ErrorsAreFatal(0);
40&Copy("root.client/usr/vice/etc/sgiload/$libafs", "/usr/vice/etc/sgiload");
41&Copy("root.client/usr/vice/etc/sgiload/afs", "/usr/vice/etc/sgiload");
42&Copy("root.client/usr/vice/etc/sgiload/afs.rc", "/usr/vice/etc/sgiload");
43&Copy("root.client/usr/vice/etc/sgiload/afs.sm", "/usr/vice/etc/sgiload");
44
45&Copy("root.client/usr/vice/etc/afsd", "/usr/vice/etc");
46&Chmod(0744, "/usr/vice/etc/afsd");
47
48system("/etc/chkconfig -f afsml on");
49&Copy("bin/fs", "/usr/vice/etc/fs");
50}