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