Import Upstream version 1.8.5
[hcoop/debian/openafs.git] / src / afsinstall / lib / InstallGuides / HPx00_UX9 / unix
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 the AFS modified Unix commands
9#
10
11sub HPunix {
12 &Copy("etc/inetd", "/etc/inetd.afs");
13 &Copy("etc/ftpd", "/etc/ftpd.afs");
14 &Copy("etc/rexecd", "/etc/rexecd.afs");
15 &Copy("etc/rlogind", "/etc/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/remsh", "/usr/vice/bin");
26 &Chown (0,2, "/usr/vice/bin/remsh");
27 &Chmod (04755, "/usr/vice/bin/remsh");
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";
33ftp stream tcp nowait root /etc/ftpd.afs ftpd.afs
34shell stream tcp nowait root /etc/remshd remshd
35login stream tcp nowait root /etc/rlogind.afs rlogind.afs
36ta-rauth stream tcp nowait root internal ta-rauth
37exec stream tcp nowait root /etc/rexecd.afs rexecd.afs
38EOINETD
39
40 # comment out the rshd line in inetd.conf
41 $InetdConf = "/etc/inetd.conf";
42 &CopyStat($InetdConf, $InetdConfAfs);
43 &Patch::FileOpen($InetdConf);
44
45 $Search1 = "^(ftp\\s+.+)";
46 $Replace1 = '"#".$1';
47
48 $Search2 = "^(shell\\s+.+)";
49 $Replace2 = '"#".$1';
50
51 $Search3 = "^(login\\s+.+)";
52 $Replace3 = '"#".$1';
53
54 $Search4 = "^(exec\\s+.+)";
55 $Replace4 = '"#".$1';
56
57 if (!&Patch::Patch($InetdConf, [[1, "Substitution", $Search1, $Replace1],
58 [1, "Substitution", $Search2, $Replace2],
59 [1, "Substitution", $Search3, $Replace3],
60 [1, "Substitution", $Search4, $Replace4]])) {
61 &ErrorMsg("Did not succeed with patch", $InetdConf);
62 }
63
64 # Modify the /etc/services file
65 &ReadInstallGuide("$InstallGuideDir/GENERIC/unix");
66 &unix;
67}
68
69sub unix {
70 goto &HPunix;
71}