1 # Copyright 2000, International Business Machines Corporation and others.
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
8 # An InstallGuide for the AFS modified Unix commands
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 &Symlink ("/usr/sbin/inetd.afs", "/etc/inetd.afs");
16 &Symlink ("/usr/sbin/ftpd.afs", "/etc/ftpd.afs");
17 &Symlink ("/usr/sbin/rlogind.afs", "/etc/rlogind.afs");
20 &Patch::Verbose if ($InstallVerbose);
21 &CreateDir("/usr/vice/bin");
23 &Copy("bin/rcp", "/usr/vice/bin");
24 &Chown (0,2, "/usr/vice/bin/rcp");
25 &Chmod (04755, "/usr/vice/bin/rcp");
27 &Copy("bin/rsh", "/usr/vice/bin");
28 &Chown (0,2, "/usr/vice/bin/rsh");
29 &Chmod (04755, "/usr/vice/bin/rsh");
31 # Create the inetd.conf.afs file
32 $InetdConfAfs = "/etc/inetd.conf.afs";
33 open(INETD, ">$InetdConfAfs") || &ErrorMsg("Can't open file", $InetdConfAfs);
34 print INETD <<"EOINETD";
35 ftp stream tcp nowait root /etc/ftpd.afs ftpd.afs
36 shell stream tcp nowait root /etc/rshd rshd
37 login stream tcp nowait root /etc/rlogind.afs rlogind.afs
38 ta-rauth stream tcp nowait root internal ta-rauth
41 # comment out the rshd line in inetd.conf
42 $InetdConf = "/etc/inetd.conf";
43 &CopyStat($InetdConf, $InetdConfAfs);
44 &Patch::FileOpen($InetdConf);
46 $Search1 = "^(ftp\\s+.+)";
49 $Search2 = "^(shell\\s+.+)";
52 $Search3 = "^(login\\s+.+)";
55 if (!&Patch::Patch($InetdConf, [[1, "Substitution", $Search1, $Replace1],
56 [1, "Substitution", $Search2, $Replace2],
57 [1, "Substitution", $Search3, $Replace3]])) {
58 &ErrorMsg("Did not succeed with patch", $InetdConf);
61 # Modify the /etc/services file
62 &ReadInstallGuide("$InstallGuideDir/GENERIC/unix");