Import Upstream version 1.8.5
[hcoop/debian/openafs.git] / src / afsinstall / lib / InstallGuides / SUN4x_4x / unix
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 the AFS modified Unix commands
9 # For SUN systems running SunOS 4.x
10 #
11
12 sub SUNunix {
13 &Copy("etc/inetd", "/usr/etc/inetd.afs");
14 &Copy("etc/ftpd", "/usr/etc/in.ftpd.afs");
15 &Copy("etc/rlogind", "/usr/etc/in.rlogind.afs");
16
17 &ErrorsAreFatal(1);
18 &Patch::Verbose if ($InstallVerbose);
19 &CreateDir("/usr/vice/bin");
20
21 &Copy("bin/rcp", "/usr/vice/bin");
22 &Chown (0,2, "/usr/vice/bin/rcp");
23 &Chmod (04755, "/usr/vice/bin/rcp");
24
25 &Copy("bin/rsh", "/usr/vice/bin");
26 &Chown (0,2, "/usr/vice/bin/rsh");
27 &Chmod (04755, "/usr/vice/bin/rsh");
28
29 # Create the inetd.conf.afs file
30 $InetdConfAfs = "/etc/inetd.conf.afs";
31 open(INETD, ">$InetdConfAfs") || &ErrorMsg("Can't open file", $InetdConfAfs);
32 print INETD <<"EOINETD";
33 ftp stream tcp nowait root /usr/etc/in.ftpd.afs in.ftpd.afs
34 shell stream tcp nowait root /usr/etc/in.rshd in.rshd
35 login stream tcp nowait root /usr/etc/in.rlogind.afs in.rlogind.afs
36 ta-rauth stream tcp nowait root internal ta-rauth
37 EOINETD
38
39 # comment out the lines in inetd.conf
40 $InetdConf = "/etc/inetd.conf";
41 &CopyStat($InetdConf, $InetdConfAfs);
42 &Patch::FileOpen($InetdConf);
43
44 $Search1 = "^(ftp\\s+.+)";
45 $Replace1 = '"#".$1';
46
47 $Search2 = "^(shell\\s+.+)";
48 $Replace2 = '"#".$1';
49
50 $Search3 = "^(login\\s+.+)";
51 $Replace3 = '"#".$1';
52
53 if (!&Patch::Patch($InetdConf, [[1, "Substitution", $Search1, $Replace1],
54 [1, "Substitution", $Search2, $Replace2],
55 [1, "Substitution", $Search3, $Replace3]])) {
56 &ErrorMsg("Did not succeed with patch", $InetdConf);
57 }
58
59 # Modify the /etc/services file
60 &ReadInstallGuide("$InstallGuideDir/GENERIC/unix");
61 &unix;
62 }
63
64 sub unix {
65 goto &SUNunix;
66 }