+++ /dev/null
-#!/bin/perl
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# A Perl5 script to install AFS from a distribution directory. Installs in
-# sets called "packages", and offers a Tk based GUI for ease of use.
-#
-
-$| = 1;
-$Debug = 0;
-$RSHas = "root"; # Default ID to use for remote installs through rsh
-$Wish = "wish4.0"; # Location of Tcl/Tk shell
-$Indent = " "; # Indent package output lines with this string
-
-&GetPaths;
-&GetSysname;
-&ReadConfigFile;
-&ParseArgs;
-if ($GUI) {
- &RunGUI; }
-else {
- &CommandlineInstallPackages; };
-
-
-
-
-
-#
-# Find out where this script is. The InstallGuides ought to be in a directory
-# next to this script
-#
-sub GetPaths {
- my($libs);
- $Command = $0;
- $Command =~ s:.*/::;
-
- $BinDir = $0;
- $BinDir =~ s:$Command$::;
- $BinDir = "." if ($BinDir eq "");
- chdir($BinDir);
- $BinDir = `/bin/pwd`; chop $BinDir;
-
- $Command = "$BinDir/$Command";
-
- $libs = $BinDir;
- $libs =~ s:bin$:lib:;
- require "$libs/patch.pl";
-
- $InstallGuideDir = "$libs/InstallGuides";
-}
-
-
-
-
-# Try to deduce the system type
-sub GetSysname {
- my($OS, $revision, $version, $hardware);
-
- if (!$ENV{HOST}) {
- $ENV{HOST} = `/bin/uname -n`;
- chop $ENV{HOST}; };
-
- if ($ENV{SYS_NAME}) {
- $Sysname = $ENV{SYS_NAME};
- return; };
-
- $OS = `/bin/uname -s`; chop $OS;
- $revision = `/bin/uname -r`; chop $revision;
- $revision =~ s/\.//g; # x.y.z --> xyz
- $version = `/bin/uname -v`; chop $version;
-
- if ($OS eq "AIX") {
- $revision = "2" if ($version == 4 && $revision == 3);
- $Sysname = "rs_aix$version$revision"; };
-
- if ($OS eq "HP-UX") {
- $revision =~ s/^[A-Z]*//;
- $revision =~ s/^0//;
- chop $revision; # only 2 digits are used for HPUX
-
- if ($revision < 102) {
- $hardware = `/bin/uname -m`; chop $hardware;
- $hardware =~ s:.*/(.).*:${1}00:; };
- $Sysname = "hp${hardware}_ux$revision"; };
-
- if ($OS =~ /IRIX/) {
- $Sysname = "sgi_$revision"; };
-
- if ($OS eq "OSF1") {
- $revision =~ s/^V//;
- $revision = "32c" if ($version == 148);
- $version = "osf";
- $version = "dux" if ($revision >= 4 && $revision < 10);
- $version = "dux" if ($revision >= 40 && $revision < 100);
- $Sysname = "alpha_$version$revision"; };
-
- if ($OS eq "SunOS") {
- $hardware = `/bin/uname -m`; chop $hardware;
- $revision = int($revision/10) if ($revision >= 500);
- $hardware = "sun4x" if ($revision >= 55 && $revision < 100);
- $revision = 412 if ($revision == 413);
- $Sysname = "${hardware}_$revision"; }
-}
-
-
-
-
-# Read the config file afsinstall.rc to find out the install path buttons for
-# the GUI, the default install path, the package names and descriptions and
-# the client configuration options
-#
-sub ReadConfigFile {
- my(@RCfiles, $rc, $filename, $name, $line, @fields, $value);
- unshift(@Section, "Reading Config File");
-
- # Read in the GENERIC afsinstall.rc file for basic options, then read the
- # system specific file, then potentially read a custome file in the user's
- # home directory
- push(@RCfiles, "$InstallGuideDir/GENERIC/afsinstall.rc");
-
- # The system specific file
- $filename = &PickInstallGuide("afsinstall.rc");
- unless($filename eq "N/A" || $filename eq "SKIP" || $filename =~ /GENERIC/) {
- push(@RCfiles, $filename); };
-
- # The personal file
- $filename = $ENV{'HOME'};
- $filename .= "/" unless ($filename =~ /\/$/);
- $filename .= ".afsinstall.rc";
- for $name (0 .. $#ARGV) {
- next unless (@ARGV[$name] =~ /^-pref/);
- $filename = @ARGV[$name + 1];
- last; };
- push(@RCfiles, $filename);
-
- for $filename (@RCfiles) {
- $rc = open(RC, $filename);
- next if (!$rc);
-
- while ($line = <RC>) {
- chomp $line;
- next if ($line =~ /\#/);
- next if ($line =~ /^$/);
- # Look for leading "sysname:" string
- if ($line =~ /^(\s*([a-zA-Z_0-9]*)\s*:)/) {
- $specific = $1;
- $sys = $2;
- $sys =~ s:x:\.\*:g;
- $sys =~ tr/A-Z/a-z/;
- next unless ($Sysname =~ /$sys/);
- $line =~ s/^$specific//; }
- # Read possible install paths
- if ($line =~ /^\s*\w+\s+\//) {
- @fields = split(/\s+/, $line);
- shift(@fields) if (@fields[0] eq "");
- $name = shift @fields;
- $value = shift @fields;
- $DefaultPaths{$name} = $value;
- if ($name ne "default") {
- unless (grep(/^$name$/, @DefaultPathsList)) {
- push(@DefaultPathsList, $name); } }
- else {
- $InstallPath = $value; }
- next; }
- # Read package names
- if ($line =~ /^\s*\w+\s+\d\s*.*/) {
- @fields = split(/\s+/, $line);
- shift(@fields) if (@fields[0] eq "");
- $name = shift @fields;
- $InstallByDefault{$name} = shift @fields;
- $PkgDescription{$name} = join(" ", @fields) if ($#fields >= 0);
- unless (grep(/^$name$/, @AvailPackages)) {
- push(@AvailPackages, $name); }
- next; };
-
- # Read configuration options
- if ($line =~ /\w+=.*/) {
- ($name,$value) = split(/=/, $line);
- $Configuration{$name} = $value;
- next;
- }
- &ErrorMsg("Unable to parse line in $filename: $line");
- }
- close(RC);
- }
- shift @Section;
-}
-
-
-
-
-# Parse the command line args.
-sub ParseArgs {
- my($pkgs, $arg);
- unshift(@Section, "Initialization");
- while ($arg = shift @ARGV) {
- if ($arg =~ /^-h/) { &Usage; };
- if ($arg eq "-v" ) { $InstallVerbose = 1; $pkgs = 0; next; };
- if ($arg eq "-gui") { $GUI = 1; $pkgs = 0; next; };
- if ($arg eq "-info") { $InfoOnly= 1; $pkgs = 0; next; };
- if ($arg eq "-src") { $InstallPath = shift @ARGV; $pkgs = 0; next; };
- if ($arg =~ /^-pref/){ shift @ARGV; $pkgs = 0; next; };
- if ($arg =~ /^-noback/){ $NoOldFiles = 1; $pkgs = 0; next; };
- if ($arg eq "-pkg") { $arg = shift @ARGV; $pkgs = 1; };
- if ($pkgs) {
- push(@Packages, $arg) unless grep(/^$arg$/, @Packages);
- next; };
- &ErrorMsg("Unknown arg", $arg);
- exit; };
-
- # If no packages specified, install default packages in afsinstall.rc file.
- if ($#Packages >= 0) {
- undef %InstallByDefault;
- for $pkgs (@Packages) {
- $InstallByDefault{$pkgs} = 1; };
- $InstallSet = "custom"; }
- else {
- if (!$GUI) {
- for $pkgs (@AvailPackages) {
- push(@Packages, $pkgs) if ($InstallByDefault{$pkgs}); }; }
- else {
- @Packages = @AvailPackages; };
- $InstallSet = "default"; };
-
- if ($GUI || $InfoOnly) {
- shift @Section;
- return; };
-
- # Where to find the distribution.
- if ($InstallPath eq "") {
- &ErrorMsg("You need to specify a source directory with -src");
- exit; };
- foreach $subdir ("", "/$Sysname", "/$Sysname/dest") {
- next if (!-d "$InstallPath$subdir/root.client" );
- $InstallPath .= $subdir;
- last; };
- if (!-d "$InstallPath/root.client") {
- &ErrorMsg("No AFS distribution under $InstallPath for type", $Sysname);
- exit 1; };
- shift @Section;
-}
-
-
-
-
-sub Usage {
- print <<"EOUSAGE";
-
-Usage: AFSinstall.pl -pkg <package>+ -src <srcdir> [-nobackup] [-v] [-gui]
-
- <package> Specify what package(s) to install
- <srcdir> Specifies the AFS build tree from which to fetch the files.
- The subdirectories ".", <sysname>, and <sysname>/dest will
- be searched
- [-noback] Do not keep previous copy of replaced files as .old files
- [-v] Verbose output
- [-gui] Use a graphical interface to select and install packages
-
-EOUSAGE
- exit;
-}
-
-
-
-
-
-#
-# Command line install
-#
-
-
-sub CommandlineInstallPackages {
- my($Package, $InstallGuide, $exitcode);
- foreach $Package (@Packages) {
- unshift(@Section, $Package);
- print "\nInstalling package $Package\n";
-
- # Find package
- if ($InfoOnly) {
- $InstallGuide = "$InstallGuideDir/info/$Package.toc"; }
- else {
- $InstallGuide = &PickInstallGuide($Package); };
-
- if ($InstallGuide eq "SKIP") {
- print "Package $Package does not apply to $Sysname\n";
- shift @Section;
- next; };
- if ($InstallGuide eq "N/A") {
- &ErrorMsg("No package named $Package for $Sysname systems\n");
- $exitcode++;
- shift @Section;
- next; }
-
- &ReadInstallGuide ($InstallGuide);
- chdir($InstallPath);
- &ErrorsAreFatal(0);
- if (!defined(&$Package)) {
- &ErrorMsg("Subroutine for $Package isn't defined in Install Guide",
- $InstallGuide);
- shift @Section;
- next; };
- DOPACKAGE: { &$Package; }; };
- exit $exitcode;
-}
-
-
-
-
-# Try to find the package among the install guide directories. First look in
-# the directory matching the sysname. If the package isn't there, go to the
-# gerenalized sysnames. They have names like ALPHA_x, HPx_10x, or SGI_6x
-# Find the longest matching generalized sysname that has the package.
-# If no generalized sysnames have the package, use the GENERIC sysname.
-sub PickInstallGuide {
- my($pkg, $best, $caps, $candidate, $wildcard, $skip);
- $pkg = @_[0];
-
- if (-f "$InstallGuideDir/$Sysname/$pkg") {
- return "$InstallGuideDir/$Sysname/$pkg"; };
- if (-f "$InstallGuideDir/$Sysname/$pkg.skip") {
- return "SKIP"; };
-
- $caps = $Sysname;
- $caps =~ tr/a-z/A-Z/;
-
- opendir(IG, $InstallGuideDir);
- while ($candidate = readdir(IG)) {
- next unless ($candidate =~ /[A-Z]/);
- next if ($candidate eq "GENERIC");
- $wildcard = $candidate;
- $wildcard =~ s/x/.*/g;
- next unless ($caps =~ /$wildcard/);
- if (-f "$InstallGuideDir/$candidate/$pkg") {
- $best = $candidate if (length($candidate) > length($best));
- $skip = 0; };
- if (-f "$InstallGuideDir/$candidate/$pkg.skip") {
- $best = $candidate if (length($candidate) >= length($best));
- $skip = 1; }; };
- closedir(IG);
- return("SKIP") if ($skip);
- $best = "GENERIC" if ($best eq "");
-
- return("N/A") unless (-f "$InstallGuideDir/$best/$pkg");
- return("$InstallGuideDir/$best/$pkg");
-}
-
-
-
-
-
-#
-# GUI section
-#
-
-
-# The main input routine. It creates the selection window and reads input from
-# it on READTCL. Once install(s) start, it adds their file descriptors to the
-# vector ReadVec and select()'s on them as well
-sub RunGUI {
- my($selected, $command, $i, $fh, $hostname, $output, $line, $rc);
- local($ReadVec);
- &ForkTCL;
- &DrawMainWindow;
- vec($ReadVec, fileno(READTCL), 1) = 1;
- while(1) {
- select($selected = $ReadVec, undef, undef, undef);
- if (vec($selected, fileno(READTCL), 1)) {
- $command = &TclRead;
- print "Command: [$command]\n" if ($Debug >= 1);
- if ($command =~ /HOST:/) { &NewHost($command); next; };
- if ($command =~ /SHOW:/) { &ForceOutputWindow($command); next; };
- if ($command =~ /STOP:/) { &EndInstall($command); next; };
- if ($command =~ /DISMISS:/){ &DestroyOutputWindow($command); next; };
- if ($command eq "DEFAULT") { &DisablePackages; next; };
- if ($command eq "CUSTOM") { &EnablePackages; next; };
- if ($command eq "PROG") { &DestroyProgressWindow; next; };
- if ($command eq "HELP") { &GUIHelp; next; };
- if ($command eq "INFO") { &GUIInstall(" -info -v"); next; };
- if ($command eq "INSTALL") { &GUIInstall; next; };
- if ($command eq "EXIT") { last; };
- print "Unknown command from GUI: \"$command\" \n"; };
-
- # Check if any pipes produced output
- for $i (0 .. $#InstallHosts) {
- $fh = "COM$i";
- next unless (vec($selected, fileno($fh), 1));
- $hostname = @InstallHosts[$i];
- $output = "HostOutput$hostname";
-
- # Read output from install command
- print STDOUT "Reading from file handle \"$fh\" \n" if ($Debug >= 3);
- $line = <$fh>; chop $line;
- print STDOUT "Subprocess $i: ($.) [$line]\n" if ($Debug >= 3);
-
- if ($line) {
- if (&TkWidgetExists(".out$i")) {
- &AppendOutputWindow($i, $line); };
-
- push(@$output, $line); };
-
- # Terminate quickly if rsh is failing
- if ($line eq "No remote authentication") {
- &ErrorWindow(" Rsh is not working on ", $hostname);
- @InstallResult[$i] = "FAILED";
- &EndInstall($i);
- next; };
-
- # Terminate quickly if Perl is wrong version
- if ($line =~ /syntax error.*my\(/i) {
- &ErrorWindow("Perl must be version 5 on", $hostname);
- &EndInstall($i);
- &DestroyOutputWindow($i);
- undef @$output;
- next; };
-
- # Fill in status boxes in Progress window as package names appear
- if ($line =~ /Installing package /) {
- $nextpkg = $';
- if (@Installing[$i]) {
- &TclPrint("set InstallResult-$i-@Installing[$i] SUCCESS"); };
- @Installing[$i] = $nextpkg;
- &TclPrint("set InstallResult-$i-@Installing[$i] WORKING"); };
-
- # If an error occurs, put an error message in package's result box.
- # Set the @Installing package name to "error" so that when the next
- # package name comes up this one doesn't get reset to "success"
- if ($line =~ /^ *ERROR:/) {
- if (@Installing[$i]) {
- &TclPrint("set InstallResult-$i-@Installing[$i] ERROR");
- @Installing[$i] = "ERROR"; };
- @InstallResult[$i] = "ERRORS"; };
-
- # When installation is done, set the last status box to done. If it
- # had an error, the @Installing pkg name is safely set to ERROR anyway.
- # If no packages were installed, it's a failure.
- # End the installation
- if (eof($fh)) {
- if (@Installing[$i]) {
- &TclPrint("set InstallResult-$i-@Installing[$i] SUCCESS"); }
- else {
- @InstallResult[$i] = "FAILED"; }
- &EndInstall($i); }; }; };
-
- &TclPrint("exit");
-}
-
-
-
-
-# Create a TCL process and attach its STDOUT and STDIN to this Perl script
-sub ForkTCL {
- my($ready);
- pipe R0, WRITETCL;
- pipe READTCL, W1;
- $TclPid = fork;
- if ($TclPid == 0) {
- open(STDIN, "<&R0");
- open(STDOUT, ">&W1");
- close(WRITETCL);
- close(READTCL);
- select(STDOUT);
- exec $Wish;
- print "Could not run wish4.0\n";
- exit; };
-
- vec($ready, fileno(WRITETCL), 1) = 1;
- select(undef, $ready, undef, 5);
- if (vec($ready, fileno(WRITETCL), 1) == 0) {
- print "Tcl/Tk didn't start\n";
- exit; };
-
- close(R0);
- close(W1);
- select WRITETCL;
- $| = 1;
- &TclPrint("wm geometry . 100x200+50+50");
- &TclPrint("proc print {args} { puts \"[lrange \$args 0 end]\"; \\");
- &TclPrint( "flush stdout }");
- select STDOUT;
-}
-
-
-
-
-sub DrawMainWindow {
- my($path, $safepath, $pkg, $n, $packer, $shortpacker, $fit);
- # Typical attributes
- $packer = " -anchor w -padx 10 -pady 5 ";
- $shortpacker = " -anchor w -padx 10";
- $fit = " -fill x -expand 1";
-
- &TclPrint("wm title . \"AFS Install\" ");
-
- # Header
- &TclPrint("set Hostname $ENV{HOST}");
- &TclPrint("frame .host -rel flat -height 3");
- &TclPrint("frame .host.name -rel flat");
- &TclPrint("label .host.name.l -text Hostname: -width 16 -anchor w");
- &TclPrint("entry .host.name.e -textvar Hostname -bd 2 -rel sunk");
- &TclPrint("bind .host.name.e <Key-Return> {print \"HOST:\$Hostname\"}");
- &TclPrint("pack .host.name.l -side left");
- &TclPrint("pack .host.name.e -side right -anchor e $fit");
- &TclPrint("pack .host.name $shortpacker $fit");
- &TclPrint("pack .host $packer $fit");
-
- # Path
- &TclPrint("set Path \"$InstallPath\"");
- &TclPrint("frame .path -rel raised -bd 2");
- &TclPrint("label .path.l -text Path -anchor w");
- &TclPrint("entry .path.e -textvar Path -wid 50 -bd 2 -rel sunk");
- &TclPrint("frame .path.go -rel flat");
-
- $n=0;
- for $path (@DefaultPathsList) {
- $safepath = $path;
- $safepath =~ s/\$/\\\$/;
- &TclPrint("button .path.go.g$n -text \"$safepath\" \\");
- &TclPrint( "-command { set Path \"$DefaultPaths{$path}\" } -bd 2");
- &TclPrint("pack .path.go.g$n -side left");
- $n++; };
- &TclPrint("button .path.go.g$n -text CLEAR -command {set Path \"\"} -bd 2");
- &TclPrint("pack .path.go.g$n -side left");
-
- &TclPrint("pack .path.l .path.e $packer $fit");
- &TclPrint("pack .path.go $shortpacker $fit");
- &TclPrint("pack .path $packer $fit");
-
- # packages
- &TclPrint("frame .pkgchoose -rel raised -bd 2");
- &TclPrint("label .pkgchoose.l -text Packages ");
- &TclPrint("pack .pkgchoose.l $packer");
-
- &TclPrint("set InstallSet $InstallSet");
- &TclPrint("radiobutton .pkgchoose.default -text \\");
- &TclPrint( "\"Default Installation\" -var InstallSet -value default");
- &TclPrint("radiobutton .pkgchoose.custom -text \"Custom Installation:\" \\");
- &TclPrint( "-var InstallSet -value custom");
- &TclPrint(".pkgchoose.default config -command { print DEFAULT }");
- &TclPrint(".pkgchoose.custom config -command { print CUSTOM }");
- &Hilight(".pkgchoose.default", "#B04040");
- &Hilight(".pkgchoose.custom", "#B04040");
- &TclPrint("pack .pkgchoose.default .pkgchoose.custom $shortpacker");
- &TclPrint("pack .pkgchoose $shortpacker $fit");
-
- &TclPrint("frame .pkg -rel raised -bd 2");
- $n=0;
- for $pkg (@AvailPackages) {
- &TclPrint("set cb$n ", 0 + $InstallByDefault{$pkg});
- &TclPrint("checkbutton .pkg.c$n -text \"$PkgDescription{$pkg}\" \\");
- &TclPrint( "-var cb$n");
- &Hilight(".pkg.c$n", "#B04040");
- &TclPrint("pack .pkg.c$n $shortpacker");
- $n++; };
-
- &DisablePackages if ($InstallSet eq "default");
- &TclPrint("pack .pkg $shortpacker $fit");
-
- # Options
- &TclPrint("frame .opt -rel raised -bd 2 ");
- &TclPrint("label .opt.label -text Options ");
- &TclPrint("pack .opt.label $shortpacker");
-
- &TclPrint("set Verbose 1") if ($InstallVerbose);
- &TclPrint("checkbutton .opt.verbose -text Verbose -var Verbose ");
- &Hilight (".opt.verbose", "#B04040");
- &TclPrint("pack .opt.verbose $shortpacker");
-
- &TclPrint("set Nooldfiles 1") if ($NoOldFiles);
- &TclPrint("checkbutton .opt.backup -text \"Don't keep backup files\" \\");
- &TclPrint(" -var Nooldfiles");
- &Hilight (".opt.backup", "#B04040");
- &TclPrint("pack .opt.backup $shortpacker");
-
- &TclPrint("pack .opt $packer $fit");
-
- # Actions
- &TclPrint("frame .action -rel flat -bd 2");
- &TclPrint("button .action.exit -text EXIT -command {print EXIT} -bd 2");
- &TclPrint("button .action.help -text HELP -command {print HELP} -bd 2");
- &TclPrint("button .action.info -text \"INFO ONLY\" -com {print INFO} -bd 2");
- &TclPrint("button .action.go -text INSTALL -com {print INSTALL} -bd 2");
- &TclPrint("pack .action.exit .action.help -side left");
- &TclPrint("pack .action.go .action.info -side right");
- &TclPrint("pack .action $packer -fill x -expand 1");
-
- &TclPrint("wm geometry . \"\"");
-}
-
-
-
-
-# After user presses ENTER in Hostname: box, determine if newly entered
-# hostname is local machine or a remote machine or a filename
-sub NewHost {
- my($hostname);
- $hostname = @_[0];
- $hostname =~ s/^HOST://;
-
- if (-f $hostname && -r $hostname) {
- &TclPrint(".host.name.l configure -text Filename: "); }
- else {
- &TclPrint(".host.name.l configure -text Hostname: "); };
-
- # Local install
- if ($hostname eq $ENV{HOST}) {
- return unless (&TkWidgetExists(".host.id"));
- &TclPrint("destroy .host.id");
- return; };
-
- # Remote install
- return if (&TkWidgetExists(".host.id"));
- &TclPrint("set UserID $RSHas");
- &TclPrint("frame .host.id -rel flat");
- &TclPrint("label .host.id.l -text \"rsh as username:\" -width 16");
- &TclPrint("entry .host.id.e -textvar UserID -bd 2 -rel sunk");
- &TclPrint("pack .host.id.l -side left -anchor w");
- &TclPrint("pack .host.id.e -side right -ancho e -fill x -expand 1");
- &TclPrint("pack .host.id -side top -padx 10 -after .host.name \\");
- &TclPrint(" -fill x -expand 1");
-}
-
-
-
-
-
-#
-# The "Default" installation is selected, so turn off the packages
-#
-sub DisablePackages {
- local($pkg, $n);
- $n = 0;
- for $pkg (@AvailPackages) {
- &TclPrint(".pkg.c$n config -state disabled");
- &TclPrint(".pkg.c$n config -selectcolor [ .pkg cget -bg ]");
- $n++; };
-}
-
-
-#
-# The "Custom" installation is selected, so turn on the packages
-#
-sub EnablePackages {
- local($pkg, $n);
- $n = 0;
- for $pkg (@AvailPackages) {
- &TclPrint(".pkg.c$n config -state normal");
- &Hilight(".pkg.c$n", "#B04040");
- $n++; };
-}
-
-
-
-
-
-#
-# GUI Based install procedure
-#
-
-# Help screen
-sub GUIHelp {
- my($line, $rc);
-
- $rc = open(HELP, "$InstallGuideDir/info/gui.toc");
- if (!$rc) {
- &ErrorWindow("Sorry, could not find the help file");
- return; };
-
- &CreateOutputWindow(0, "help");
- while ($line = <HELP>) {
- chop $line;
- $line =~ s/\"/\\\"/g;
- &AppendOutputWindow(0, $line); };
- close(HELP);
- &TclPrint(".out0.f.t see 1.0");
-}
-
-
-
-
-# Start up all pipes to start installs. Also set ReadVec with bits for all
-# running pipes.
-sub GUIInstall {
- my($rc);
- if (&TkWidgetExists(".prog")) {
- &ErrorWindow("Please close the current install window first");
- return; };
-
- $rc = &GatherData(@_);
- return if ($rc);
-
- $rc = &StartInstalls;
- return if ($rc);
-
- if (@_[0]) {
- &CreateOutputWindow(0, @InstallHosts[0]); }
- else {
- &CreateProgressWindow; };
-}
-
-
-
-
-# Get the data in the boxes of the window.
-# Sets @InstallHosts, $InstallID, $InstallPath, $InstallPkgs,
-# $InstallVerbose, and $InstallOpts
-#
-sub GatherData {
- my($pkg, $hostORfilename, $rc);
-
- @InstallHosts = ($ENV{HOST});
- undef $InstallID;
- $InstallPkgs = "";
- $InstallOpts = @_[0]; # This will be "-info -v" for Info Only install
-
- # Read the package checkbuttons. Build a list of selected package names
- &TclPrint("print \$InstallSet install");
- $InstallSet = &TclRead;
- if ($InstallSet eq "custom install") {
- for $pkg (0 .. $#AvailPackages) {
- &TclPrint("print \$cb$pkg");
- $InstallPkgs .= " @AvailPackages[$pkg]" if (&TclRead); };
- $InstallPkgs =~ s/^ //;
- if (!$InstallPkgs) {
- &ErrorWindow("No install packages specified");
- return 1; }; };
-
- return 0 if ($InstallOpts); # Info only install
-
- # Get the hostname or filename to install on
- &TclPrint("print \$Hostname");
- $hostORfilename = &TclRead;
- if (!$hostORfilename) {
- &ErrorWindow("Need to specify a hostname at top");
- return 1; };
-
- # File containing hostnames
- if (-f $hostORfilename) {
- undef @InstallHosts;
- $rc = open(HOSTS, $hostORfilename);
- if (!$rc) {
- &ErrorWindow("Cannot read", $hostORfilename);
- return 1; };
- @InstallHosts = <HOSTS>;
- chomp @InstallHosts;
- close(HOSTS); }
- else {
- @InstallHosts = ($hostORfilename); };
-
- # Remote host named. Get the username under which to rsh
- if ($hostORfilename ne $ENV{HOST}) {
- if (&TkWidgetExists(".host.id")) {
- &TclPrint("print \$UserID");
- $InstallID = &TclRead; };
- $InstallID = $RSHas if (!$InstallID); };
-
- &TclPrint("print \$Path");
- $InstallPath = &TclRead;
- if (!$InstallPath) {
- &ErrorWindow("Need to specify a path to install from");
- return 1; };
-
- &TclPrint("print \$Verbose");
- $InstallVerbose = &TclRead;
- $InstallOpts .= "-v " if ($InstallVerbose);
-
- &TclPrint("print \$Nooldfiles");
- $NoOldFiles = &TclRead;
- $InstallOpts .= "-nobackup " if ($NoOldFiles);
-
- return 0;
-}
-
-
-
-
-# Start all install processes. Splice out hostnames that couldn't be started
-# Truncates fully qualified hostnames down to hostname
-# Sets @Pid, $ReadVec, and filehandle COM<i>
-# Clears @HostOuput<hostname> and @Installing
-#
-# Returns 0 if install(s) are started, 1 otherwise
-#
-sub StartInstalls {
- my($i, $fh, $output, $command, @brokenpipes);
-
- undef @Installing;
- $i = 0; # Cannot let $i start off undefined; must be numerical
- while ($i <= $#InstallHosts) {
- $command = "";
- $command = "rsh -n -l $InstallID @InstallHosts[$i] " if ($InstallID);
- $command .= "$Command ";
- $command .= "-src $InstallPath ";
- $command .= "-pkg $InstallPkgs " if ($InstallPkgs);
- $command .= $InstallOpts;
- #$command = "/bin/echo Installing package rc\n";
-
- print STDOUT "COMMAND: \"$command\" \n" if ($Debug >= 2);
-
- $fh = "COM$i";
- @Pid[$i] = open($fh, "$command 2>&1 |");
- if (@Pid[$i]) {
- @InstallHosts[$i] =~ s:\..*::;
- print STDOUT "Install on @InstallHosts[$i] started\n" if ($Debug >= 1);
- $output = "HostOutput@InstallHosts[$i]";
- undef @$output;
- vec($ReadVec, fileno($fh), 1) = 1;
- $i++; }
- else {
- push(@brokenpipes, splice(@InstallHosts, $i, 1)); }; };
-
- if ($#brokenpipes >= 0) {
- &ErrorWindow("Could not create pipes for:", @brokenpipes); };
-
- print STDOUT $#InstallHosts + 1, " installs started\n" if ($Debug >= 1);
- return 0 if ($#InstallHosts >=0);
- return 1;
-}
-
-
-
-
-# An install process is done
-# Parameter passed in is "STOP: i" where "i" is the index into @Pid, COM<i>,
-# and @InstallHosts
-#
-# Kill the process, reset its @Pid, close it's file handle
-#
-sub EndInstall {
- my($num, $fh);
- $num = @_[0];
- $num =~ s/[^0-9]//g;
- @InstallResult[$num] = "KILLED" if (@_[0] =~ /^STOP/);
-
- kill 9, @Pid[$num] if (@Pid[$num] > 0);
- print STDOUT "Process \"$num\" killed\n" if ($Debug >= 2);
- @Pid[$num] = -1;
- if (&TkWidgetExists(".out$num.act.stop")) {
- &TclPrint("destroy .out$num.act.stop"); };
-
- $fh = "COM$num";
- vec($ReadVec, fileno($fh), 1) = 0;
- close($fh);
-
- &TclPrint("set InstallResult-$num-done @InstallResult[$num]");
-}
-
-
-
-
-# Set the colors of a Tk widget
-sub Hilight {
- my($widget, $color) = @_;
- &TclPrint("$widget configure -activebackground [ $widget cget -bg ]");
- &TclPrint("$widget configure -activeforeground black ");
- &TclPrint("$widget configure -selectcolor \"$color\" ");
-}
-
-
-
-
-# Create a window to show progress of install
-sub CreateProgressWindow {
- my($pkg, $host, $i, @pkglist, $dx, $dy);
- &TclPrint(".action.go config -state disabled");
- &TclPrint(".action.info config -state disabled");
- &TclPrint("toplevel .prog");
- &TclPrint("wm geometry .prog 100x100+100+150");
- &TclPrint("wm title .prog Installing");
- &TclPrint("wm protocol .prog WM_DELETE_WINDOW { print PROG }");
-
- # Create a "Packages" label in UL corner
- # &TclPrint("label .prog.pkg -text \"Packages\" -width 20 -anchor w");
- # &TclPrint("place .prog.pkg -x 10 -y 10");
-
- # Create the lefthand column of package names
- @pkglist = split(/ /, $InstallPkgs);
- @pkglist = @AvailPackages if ($#pkglist < 0);
- $dy = 45;
- foreach $pkg (@pkglist, "done") {
- &TclPrint("label .prog.$pkg -text \"$pkg\"");
- &TclPrint("place .prog.$pkg -in .prog -x 10 -y $dy");
- $dy += 30; };
-
- # Create a column of indicators for each host
- $i = 0;
- $dx = 100;
- foreach $host (@InstallHosts) {
- &TclPrint("button .prog.h$i -text \"$host\" -command { print SHOW: $i }");
- &TclPrint("place .prog.h$i -in .prog -x $dx -y 10");
- $dy = 40;
- $dx += 5;
-
- # Lights for each package for this host
- foreach $pkg (@pkglist, "done") {
- &TclPrint("set InstallResult-$i-$pkg \"\"");
- &TclPrint("entry .prog.h$i-$pkg -width 8 -text InstallResult-$i-$pkg");
- &TclPrint("place .prog.h$i-$pkg -in .prog -x $dx -y $dy");
- &TclPrint(".prog.h$i-$pkg config -state disabled");
- $dy += 30; };
- @InstallResult[$i] = "SUCCESS"; # gotta be optimistic
- $dx += 75;
- $i++; };
-
- # Create a "go away" button
- $dy += 15;
- &TclPrint("label .prog.verbose -text \"Click hostname to view output\"");
- &TclPrint("place .prog.verbose -in .prog -x 10 -y $dy");
- $dy += 30;
- &TclPrint("button .prog.exit -text DISMISS -com { print PROG }");
- &TclPrint("place .prog.exit -in .prog -x 10 -y $dy");
- $dy += 35;
- $dx = 200 if ($dx < 200);
-
- # Display everything
- $i = $dx . "x" . $dy . "+100+150";
- &TclPrint("wm geometry .prog $i");
-}
-
-
-
-
-# Delete the progress window
-sub DestroyProgressWindow {
- my($hostname, $output);
- &TclPrint("destroy .prog") if (&TkWidgetExists(".prog"));
- &TclPrint(".action.go config -state normal");
- &TclPrint(".action.info config -state normal");
-
- # Clear install output from memory
- for $hostname (@InstallHosts) {
- $output = "HostOutput$hostname";
- undef @$output; };
-}
-
-
-
-
-# Create the 2nd window into which install output is written.
-sub CreateOutputWindow {
- my($i, $hostname, $x);
- $i = shift @_;
- $hostname = shift @_;
- &TclPrint("destroy .out$i") if (&TkWidgetExists(".out$i"));
-
- if (&TkWidgetExists(".prog.h$i")) {
- &TclPrint(".prog.h$i config -state disabled"); };
-
- $x = 250 + $i * 10;
- &TclPrint("toplevel .out$i");
- &TclPrint("wm geometry .out$i 100x100+$x+150");
- &TclPrint("wm title .out$i \"Command Output $hostname\"");
- &TclPrint("wm protocol .out$i WM_DELETE_WINDOW { print DISMISS: $i }");
-
- &TclPrint("frame .out$i.f -bd 2");
- &TclPrint("text .out$i.f.t -width 80 -height 20 -bd 2");
- &TclPrint("scrollbar .out$i.f.s -command \".out$i.f.t yview\" -bd 2");
- &TclPrint(".out$i.f.t config -yscr \".out$i.f.s set\"");
- &TclPrint("pack .out$i.f.t -side left -expand yes -fill both");
- &TclPrint("pack .out$i.f.s -side right -fill y");
- &TclPrint("pack .out$i.f -side top -expand yes -fill both");
-
- &TclPrint("frame .out$i.act -relief flat");
- if(@Pid[$i] > 0) {
- &TclPrint("button .out$i.act.stop -text \"STOP INSTALL\" \\");
- &TclPrint( "-com {print STOP: $i } -bd 2");
- &TclPrint("pack .out$i.act.stop -padx 20 -side left"); };
- &TclPrint("button .out$i.act.dismiss -text DISMISS \\");
- &TclPrint( "-com {print DISMISS: $i } -bd 2");
- &TclPrint("pack .out$i.act.dismiss -padx 20 -side right");
-
- &TclPrint("pack .out$i.act -side bottom");
-
- &TclPrint("wm geometry .out$i \"\" ");
-
- # Create some tags in the text box for easy highlighting
- &TclPrint(".out$i.f.t tag add err 1.0 1.0");
- &TclPrint(".out$i.f.t tag configure err -background \\#B04040");
- &TclPrint(".out$i.f.t tag add header 1.0 1.0");
- &TclPrint(".out$i.f.t tag configure header -background \\#A0A0A0");
- &TclPrint(".out$i.f.t tag add normal 1.0 1.0");
-}
-
-
-
-
-# Print in the output window
-# Parameters passed in are the window number and the text to print
-sub AppendOutputWindow {
- my($i, $line, $padlen);
- $i = shift @_;
- for $line (@_) {
- # Backslash escape any quote characters that aren't already escaped
- $line =~ s/([^\\])\"/$1\\\"/g;
- # Backslash escape any bracket characters that aren't already escaped
- $line =~ s/([^\\])([\[\]])/$1\\$2/g;
-
- # Errors turn red
- if ($line =~ /^ *ERROR:/) {
- &TclPrint(".out$i.f.t insert end \"$Indent\" normal \"ERROR:\" err \\");
- &TclPrint( "\"$'\\n\" normal");
- next; }
- # Package names get highlighted in grey
- elsif ($line =~ /^Installing package/) {
- &TclPrint(".out$i.f.t insert end \"\\n\" normal \"$line \" header \\");
- &TclPrint("\"\\n\" normal");
- next; }
- # Normal text
- else {
- &TclPrint(".out$i.f.t insert end \"$line\\n\" normal"); }; };
-
- # Scroll window to end of output
- &TclPrint(".out$i.f.t see end");
-}
-
-
-
-
-# Create the output window and dump to it all of the lines of output that
-# have been accumulated so far
-sub ForceOutputWindow {
- my($i, $hostname, $output);
- $i = @_[0];
- $i =~ s/^SHOW: //;
- return if (&TkWidgetExists(".out$i"));
-
- $hostname = @InstallHosts[$i];
- $output = "HostOutput$hostname";
-
- &CreateOutputWindow($i, $hostname);
- &AppendOutputWindow($i, @$output);
-}
-
-
-
-
-sub DestroyOutputWindow {
- my($i);
- $i = @_[0];
- $i =~ s/[^0-9]//g;
- &TclPrint("destroy .out$i") if (&TkWidgetExists(".out$i"));
- &TclPrint(".prog.h$i config -state normal") if(&TkWidgetExists(".prog.h$i"));
-}
-
-
-
-
-# Create a temp window with a message and an OK button
-sub ErrorWindow {
- my($win, $phrase, $i);
- $win = ".err$ErrorWindowNumber";
- $ErrorWindowNumber++;
- &TclPrint("toplevel $win");
- &TclPrint("wm geometry $win 100x20+", 50 + $ErrorWindowNumber * 5, "+150");
- &TclPrint("wm title $win Message");
- &TclPrint("wm protocol $win WM_DELETE_WINDOW { destroy $win }");
-
- $i = 0;
- for $phrase (@_) {
- &TclPrint("label $win.l$i -text \"$phrase\"");
- &TclPrint("pack $win.l$i -side top -padx 10");
- $i++; };
- &TclPrint("button $win.b -text OK -command { destroy $win }");
- &TclPrint("pack $win.b -pady 10 -anchor center");
-
- &TclPrint("wm geometry $win \"\" ");
-}
-
-
-
-
-
-#
-# Routines for the Install Guides to use
-#
-
-
-# Read an InstallGuide file into the Perl context
-sub ReadInstallGuide {
- my($ig, $rc, $contents, $line);
- $ig = @_[0];
-
- $rc = open(IG, $ig);
- if (!$rc) {
- &ErrorMsg("Could not read Install Guide", $ig);
- return 1; };
- while ($line = <IG>) {
- $contents .= $line; };
- close(IG);
-
- eval $contents;
- &ErrorMsg("$ig could not be avalulated:$@") if ($@ ne "");
-
-}
-
-
-
-
-# Copy a file. Because there are so many error checks in this routine, a
-# wrapper is put around it so any errors can return() without a lot of
-# cleanup code.
-sub Copy {
- my(@msg);
- unshift(@Section, "Copy");
-
- @msg = &CopyWrapper(@_);
- &ErrorMsg(@msg) unless (@msg[0] eq "OK");
- close(SRC);
- close(DST);
-
- shift @Section;
-}
-
-sub CopyWrapper {
- my($srcprog, $dstprog, $prog, @prog, $mode, $rc, $olddstprog, $different);
- my($dbytes, $dstbuf, $sbytes, $srcbuf);
- $different = $olddstprog = 0;
-
- return("Wrong number of args") if ($#_ != 1);
- $srcprog = shift @_;
- $dstprog = shift @_;
-
- # If a directory was given as the dest, append the filename
- @prog = split(/\//, $srcprog);
- $prog = pop(@prog);
- $dstprog =~ s:/$::;
- $dstprog .= "/$prog" if (-d $dstprog);
-
- # Open the src and new dest file
- $rc = open(SRC, $srcprog);
- return("Could not open src file to Copy", $srcprog) if (!$rc);
-
- $newdstprog = "$dstprog.new";
- $rc = open(NEW, ">$newdstprog");
- return("Could not open new dst file for Copy", $newdstprog) if (!$rc);
-
- if (-e $dstprog) {
- $rc = open(DST, $dstprog);
- $olddstprog = "$dstprog.old"; }
- while ($sbytes = read(SRC, $srcbuf, 4096)) {
- if ($olddstprog) {
- $dbytes = read(DST, $dstbuf, 4096);
- if (!$different) {
- if ($sbytes != $dbytes || $srcbuf ne $dstbuf) {
- $different = 1; }; }; };
- print NEW $srcbuf; };
-
- if (!$olddstprog || $different) {
- &VPrint ("Copying file: \"$srcprog\" to \"$dstprog\"");
- if ($olddstprog && !$NoOldFiles) {
- unlink($olddstprog);
- rename($dstprog, $olddstprog); };
- $rc = rename($newdstprog, $dstprog);
- if (!$rc) {
- if ($! eq "Text file busy") {
- rename($dstprog, "$dstprog.busy");
- $rc = rename($newdstprog, $dstprog); }
- &ErrorMsg("Could not install new version of", $newdstprog) if (!$rc); };
-
- # Set the mode bits of the dst file identical to the src file
- &Chown(0,2, $dstprog);
- &Chmod(0755, $dstprog); }
- else {
- &VPrint("\"$dstprog\" is already a copy of \"$srcprog\"");
- unlink($newdstprog); };
- return("OK");
-}
-
-
-
-
-# Read a file, looking for an AFS marker
-sub AFSversion {
- my($filename, $version, $rc, $line);
- $filename = @_[0];
- $rc = open(FILE, $filename);
- return("") if (!$rc);
- while ($line = <FILE>) {
- next unless ($line =~ /Base configuration afs/);
- $line =~ s/.*Base configuration //;
- $line =~ s/\000.*//;
- last; };
- close(FILE);
-
- if ($line) {
- $version = $line;
- $version =~ s/;.*//;
- chomp $version;
- $version .= "+" if ($&);
- $version =~ s/ /-/g; };
- return($version);
-}
-
-
-
-# Copy a file from one place to another. At the destination site, keep a hard
-# link to the file naming what version the file is. The version string will
-# be ".orig" for non-AFS files, or the AFS version number (eg -afs3.4-5.00)
-# for AFS files. Attempt to preserve old ,orig files and NOT preserve multiple
-# AFS versions.
-sub VersionCopyFile {
- my(@msg);
- unshift(@Section, "VersionCopyFile");
-
- @msg = &VersionCopyFileWrapper(@_);
- &ErrorMsg(@msg) unless (@msg[0] eq "OK");
- shift @Section;
-}
-
-sub VersionCopyFileWrapper {
- my($from, $to, $link, $rc, $inode, @paths, $dir, $file);
- my($from_vers, $to_vers, $old_vers, $buf);
- $from = shift @_;
- $to = shift @_;
-
- # Error check
- return("No such file", $from) if (!-f $from);
- $from_vers = &AFSversion($from);
-
- # Check if there is already a file in the destination place
- if (-e $to) {
- @stats = stat(_);
- $to_vers = &AFSversion($to);
-
- # If the $to file is a soft link, just remove it
- if (-l $to) {
- &VPrint("Removing soft link \"$to\"");
- $rc = unlink($to);
- return("Could not remove symlink", $to) if ($rc != 1); }
-
- # Cannot work if $to is a directory
- elsif (-d $to) {
- return("$to is a directory"); }
-
- # The $to file exists but was not a soft symlink. Move aside or delete it.
- # If the $to file is the same version as $from, just remove $to.
- # Otherwise move $to aside
- else {
- if ($to_vers eq $from_vers) {
- &VPrint("Removing \"$to\" that is same version as \"$from\"");
- $rc = unlink($to);
- return("Could not remove \"$to\"") if (!$rc); }
- else {
- # Make a new name to which to move the old $to file
- if ($to_vers) {
- $file = "$to-$to_vers"; }
- else {
- $file = "$to.orig"; };
- &VPrint("Moving \"$to\" to \"$file\"");
- return("Cannot move old \"$to\" to \"$file\"") if (-d $file);
- unlink($file);
- $rc = rename($to, $file);
- return("Could not move \"$to\" to", $file) if (!$rc); }; }; };
-
- # Do the actual copy
- &VPrint("Copying \"$from\" to \"$to\"");
- $rc = open(SRC, $from);
- return("Could not read original file", $from) if (!$rc);
- $rc = open(DST, ">$to");
- return("Could not open for writing", $to) if (!$rc);
- while(read(SRC, $buf, 4096)) {
- $rc = print DST $buf;
- return("write() failed to", $to) if (!$rc); };
- close(DST);
- close(SRC);
-
- # Create a hard link of the dest file
- $version = &AFSversion($to);
- if ($version) {
- $link = "$to-$version"; }
- else {
- $link = "$to.orig"; };
-
- # If a file already exists where the hard link is to be, delete it
- if (-f $link) {
- &VPrint("Removing \"$link\" to place a new hard link there");
- $rc = unlink($link);
- return("Could not ($!) remove old", $link) if (!$rc); };
-
- # Make the hardlink
- &VPrint("Creating new hard link \"$link\"");
- $rc = link($to, $link);
- return("Could not make hardlink \"$to\" to", $link) if (!$rc);
- return("OK");
-}
-
-
-
-
-# Create a list of directories and any parent directories required
-# Only use absolute paths that start with /
-sub CreateDir {
- my($dir, $path, @subdirs, $subdir, $rc);
- unshift(@Section, "CreateDir");
- foreach $dir (@_) {
-
- # Make sure an absolute path was given
- if (substr($dir, 0, 1) ne "/") {
- &ErrorMsg("Won't mkdir relative directory", $dir);
- shift @Section;
- return; };
-
- # Check each parent directory. Work up parent dirs with $path variable.
- # Split up the entire path into an array. Since $dir starts with a /, the
- # first scalar in the array will be "". Remove it.
- $path = "";
- @subdirs = split(/\//, $dir);
- shift @subdirs;
-
- VPrint("Creating directory: \"$dir\"");
-
- foreach $subdir (@subdirs) {
- $path .= "/$subdir";
- next if (-d $path);
- next if (-l $path);
-
- # Create the directory and check the return code
- $rc = mkdir($path, 0775);
- next if ($rc);
- &ErrorMsg("Cannot create directory", $path);
- shift @Section;
- return; }; };
- shift @Section;
-}
-
-
-
-
-# Create a symlink. Carefully.
-sub Symlink {
- my($filename, $linkname, $rc);
- unshift(@Section, "Symlink");
- $filename = @_[0];
- $linkname = @_[1];
- &VPrint("Making \"$linkname\" point to \"$filename\"");
- &DisplaceFile($linkname);
- $rc = symlink($filename, $linkname);
- &ErrorMsg("Could not make symlink", "$linkname -> $filename") if (!$rc);
- shift @Section;
-}
-
-
-
-
-# Move a file aside. Because there are so many error checks in this routine, a
-# wrapper is put around it so any errors can return() without a lot of
-# cleanup code.
-sub DisplaceFile {
- my(@msg);
- unshift(@Section, "DisplaceFile");
-
- @msg = &DisplaceWrapper(@_);
- &ErrorMsg(@msg) unless (@msg[0] eq "OK");
- shift @Section;
-}
-
-# Move a file aside. If it is an AFS file, delete it. Otherwise move it
-# to .orig This is for files like fsck and login that have AFS equivalents
-sub DisplaceWrapper {
- my($rc, $displace, $line, $isAFS);
-
- $displace = @_[0];
- return("OK") if (!-e $displace);
-
- # If destination is just a symlink, remove it
- if (readlink($displace)) {
- &VPrint("Removing old \"$displace\" symlink");
- $rc = unlink($displace);
- return("Could not remove link", $displace) if (!$rc);
- return("OK"); };
-
- # If dest is not a file, (ie a directory) this is unfixable
- return("Not a file", $displace) if (-d $displace);
-
- # Read the file, looking for an AFS marker
- $isAFS = &AFSversion($displace);
-
- # Either remove an AFS file or rename a non-AFS file
- if ($isAFS) {
- $rc = unlink($displace);
- return("Could not remove file", $displace) if (!$rc); }
- else {
- &VPrint("Moving old file \"$displace\" aside");
- $rc = rename($displace, "$displace.orig");
- return("Could not rename file", $displace) if (!$rc); };
- return("OK");
-}
-
-
-
-
-# Change the mode bits of a file
-sub Chmod {
- my ($mode, $file, $rc);
- unshift(@Section, "Chmod");
- $mode = shift @_;
- while ($file = shift @_) {
- &VPrint("Setting mode bits on $file to ", sprintf("%lo", $mode));
- $rc = chmod($mode, $file);
- &ErrorMsg("Could not change mode bits of", $file) if (!$rc); };
- shift @Section;
-}
-
-
-
-
-# Change the owner of a file
-sub Chown {
- my ($user, $group, $file, $rc);
- unshift(@Section, "Chown");
- $user = shift @_;
- $group = shift @_;
- while ($file = shift @_) {
- &VPrint("Setting owner of \"$file\" to $user,$group");
- $rc = chown $user, $group, $file;
- &ErrorMsg("Could not change mode bits of", $file) if (!$rc); };
- shift @Section;
-}
-
-
-
-
-# Copy the UID, GID, and MODE info from one file to another
-sub CopyStat {
- my ($user, $group, $srcfile, $destfile, $mode, $rc, @statinfo);
- unshift(@Section, "CopyStat");
- $srcfile = shift @_;
- $destfile = shift @_;
- @statinfo = stat($srcfile);
- $mode = $statinfo[2];
- $user = $statinfo[4];
- $group = $statinfo[5];
- &VPrint("Copying owner,group,mode of \"$srcfile\" to \"$destfile\"");
- $rc = chown $user, $group, $destfile;
- &ErrorMsg("Could not change mode bits of", $destfile) if (!$rc);
- $rc = chmod $mode, $destfile;
- &ErrorMsg("Could not change mode bits of", $destfile) if (!$rc);
- shift @Section;
-}
-
-
-
-#
-# Misc printing routines
-#
-
-
-# This routine causes calls to ErrorMsg to be fatal
-sub ErrorsAreFatal {
- $Fatal = @_[0];
-}
-
-
-
-
-# Print a line with a prepended indent string
-sub Print {
- my($text);
- $text = join("", @_);
- print "$Indent$text\n";
-}
-
-
-
-
-# Print only if in Verbose mode
-sub VPrint {
- return unless ($InstallVerbose);
- &Print(@_);
-}
-
-
-
-
-# A routine to make consistent error messages
-sub ErrorMsg {
- my($msg, $prog);
- $msg = "ERROR: @Section[0]: ";
- $msg .= shift @_;
- $prog = shift @_;
- if ($prog) {
- $prog =~ s:^$InstallPath::;
- $msg .= " \"$prog\""; };
- $msg .= " ($!)" if (($? >> 8) && $Debug);
- &Print($msg);
- last DOPACKAGE if ($Fatal);
-}
-
-
-
-
-# Write a Tcl/Tk command to the $Wish process
-sub TclPrint {
- my($text);
- $text = join("", @_);
- print STDOUT "TO TCL:\"$text\" \n" if($Debug >= 4);
- if ($text =~ /\\$/) {
- $text =~ s:\\$: :;
- print WRITETCL $text; }
- else {
- print WRITETCL "$text\n"; };
-}
-
-
-
-
-# Read a line from Tcl/Tk, and chop off any {} symbols Tcl tacks on
-sub TclRead {
- my($line);
- print STDOUT "Reading from Tcl\n" if ($Debug >= 4);
- $line = <READTCL>;
- chop $line;
- $line =~ s:{::;
- $line =~ s:}::;
- print STDOUT "FROM TCL:\'$line\' \n" if ($Debug >= 4);
- return($line);
-}
-
-
-
-
-# Query Tcl/Tk if a particular widget is drawn. 1=yes 0=no
-sub TkWidgetExists {
- my($reply);
- &TclPrint("print reply: [ info command @_[0] ]");
- $reply = &TclRead;
- return 0 if ($reply eq "reply: ");
- return 1;
-}
+++ /dev/null
-/*
- * Copyright 2000, International Business Machines Corporation and others.
- * All Rights Reserved.
- *
- * This software has been released under the terms of the IBM Public
- * License. For details, see the LICENSE file in the top-level source
- * directory or online at http://www.openafs.org/dl/license10.html
- */
-
-#
-# Initialization file for AFSinstall on Alpha machines
-#
-#
-#
-# Alternate directories
-#
-
-#
-# Install packages
-# file Default Description
-#
-modkernel 0 Dynamic kernel libraries and afsd
-bldkernel 1 Static kernel libraries and afsd
-build 1 Perform kernel build
-installkernel 1 Install AFS aware kernel
-
-#
-# Client configuration options
-#
-# option definition
-
-
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# An InstallGuide for static kernel built libraries
-# For Alpha systems running Digital Unix 3.x
-#
-
-sub bldkernel {
-my($host);
-
-if ($Configuration{"NFSEXTENSIONS"}) {
- &Copy("root.client/bin/libafs.o", "/usr/sys/BINARY"); }
-else {
- &Copy("root.client/bin/libafs.nonfs.o", "/usr/sys/BINARY/libafs.o"); };
-
-&CreateDir("/usr/vice/etc");
-&Copy("root.client/usr/vice/etc/afsd", "/usr/vice/etc");
-&Chmod(0744, "/usr/vice/etc/afsd");
-&Copy("bin/fs", "/usr/vice/etc/fs");
-
-&ErrorsAreFatal(1);
-# Patch the files
-if (!-f "/usr/sys/conf/AFS") {
- $host = $ENV{HOST};
- $host =~ tr/a-z/A-Z/;
- &Copy("/usr/sys/conf/$host", "/usr/sys/conf/AFS"); };
-
-$AFS="/sys/conf/AFS";
-$FILES="/sys/conf/files";
-$VFSCONF="/sys/vfs/vfs_conf.c";
-
-&Patch::Verbose if ($InstallVerbose);
-
-&Patch::FileOpen($AFS);
-&Patch::FileOpen($FILES);
-&Patch::FileOpen($VFSCONF);
-
-$AFSSearchInsert = <<"xxENDxx";
-options UFS
-options NFS
-xxENDxx
-$AFSNewInsert = <<"xxENDxx";
-options AFS
-xxENDxx
-
-$AFSSearchReplace = "ident\\s+.+";
-$AFSNewReplace = "ident\t\t\"AFS\"";
-
-if (!&Patch::Patch($AFS, [[0, "Insert", $AFSSearchInsert, $AFSNewInsert],
- [1, "Replace", $AFSSearchReplace, $AFSNewReplace]])) {
- &ErrorMsg("Did not succeed with patch", $AFS);
-}
-
-$FILESSearch1 = "OPTIONS/nfs\\s.*";
-$FILESNew1 = "OPTIONS/afs \t\t\toptional afs define_dynamic";
-
-#$FILESSearch2 = "nfs/nfs3_server.c\\s.*";
-#$FILESNew2 = << "xxENDxx";
-#MODULE/afs optional afs Binary
-#afs/libafs.c module afs
-#xxENDxx
-$FILESNew2 = "afs/libafs.c\t\t\toptional afs if_dynamic afs Binary";
-
-#if (!&Patch::Patch($FILES, [[1, "Insert", $FILESSearch1, $FILESNew1],
-# [1, "Insert", $FILESSearch2, $FILESNew2]])) {
-# &ErrorMsg("Did not succeed with patch", $FILES);
-#}
-if (!&Patch::Patch($FILES, [[1, "Insert", $FILESSearch1, $FILESNew1],
- [0, "EOF", $FILESSearch2, $FILESNew2]])) {
- &ErrorMsg("Did not succeed with patch", $FILES);
-}
-
-$VFSSearch1 = "#include <cdfs.h>";
-$VFSNew1 = << "xxENDxx";
-#include <afs.h>
-#if defined(AFS) && AFS
-extern struct vfsops afs_vfsops;
-#endif
-
-#include <cdfs.h>
-xxENDxx
-
-$VFSSearch2 = << "xxENDxx";
- (struct vfsops *)0, "", /* 13 = MOUNT_ADDON */
-xxENDxx
-
-$VFSNew2 = << "xxENDxx";
-#if defined(AFS)
- &afs_vfsops, "afs",
-#else
- (struct vfsops *)0, "", /* 13 = MOUNT_ADDON */
-#endif
-xxENDxx
-
-
-
-if (!&Patch::Patch($VFSCONF, [[0, "Replace", $VFSSearch1, $VFSNew1],
- [0, "Replace", $VFSSearch2, $VFSNew2]])) {
- &ErrorMsg("Did not succeed with patch", $VFSCONF);
-}
-}
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# An InstallGuide for compiling a new kernel
-# For Alpha systems running Digital Unix 3.x
-#
-
-sub build {
-&Print("Compiling with command \"doconfig -c AFS\"");
-&Print("Answering \"no\" to request to modify configuration");
-&Print("New kernel will be /usr/sys/AFS/vmunix");
-&Print("and should be installed as /vmunix");
-
-$rc = system("/bin/echo no | doconfig -c AFS ");
-$rc = $rc >> 8;
-&Print("Returned code $rc");
-}
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# An InstallGuide for installing a new kernel
-# For Alpha systems running Digital Unix
-#
-
-
-sub installkernel {
-&VersionCopyFile("/usr/sys/AFS/vmunix", "/vmunix");
-}
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# An InstallGuide for installing the initialization script
-# For Alpha systems running Digital Unix 3.x
-#
-
-sub rc {
-&Copy("root.client/usr/vice/etc/dkload/afs.rc", "/sbin/init.d/afs");
-&Symlink("../init.d/afs", "/sbin/rc0.d/K66afs");
-&Symlink("../init.d/afs", "/sbin/rc3.d/S90afs");
-}
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# An InstallGuide for the AFS modified Unix commands
-#
-
-sub OSFunix {
- &Copy("etc/inetd", "/usr/sbin/inetd.afs");
- &Copy("etc/ftpd", "/usr/sbin/ftpd.afs");
- &Copy("etc/rlogind", "/usr/sbin/rlogind.afs");
-
- &ErrorsAreFatal(1);
- &CreateDir("/usr/vice/bin");
-
- &Copy("bin/rcp", "/usr/vice/bin");
- &Chown (0,2, "/usr/vice/bin/rcp");
- &Chmod (04755, "/usr/vice/bin/rcp");
-
- &Copy("bin/rsh", "/usr/vice/bin");
- &Chown (0,2, "/usr/vice/bin/rsh");
- &Chmod (04755, "/usr/vice/bin/rsh");
-
- # Create the inetd.conf.afs file
- $InetdConfAfs = open(INETD, "> /etc/inetd.conf.afs");
- &ErrorMsg("Can't open file", "/etc/inetd.conf.afs") if (!$InetdConfAfs);
- print INETD <<"EOINETD";
-ftp stream tcp nowait root /usr/sbin/ftpd.afs ftpd.afs
-shell stream tcp nowait root /usr/sbin/rshd rshd
-login stream tcp nowait root /usr/sbin/rlogind.afs rlogind.afs
-ta-rauth stream tcp nowait root internal ta-rauth
-EOINETD
-
- # comment out the lines in inetd.conf
- $InetdConf = "/etc/inetd.conf";
- &CopyStat($InetdConf, $InetdConfAfs);
- &Patch::Verbose if ($InstallVerbose);
- &Patch::FileOpen($InetdConf);
-
- $Search1 = "^(ftp\\s+.+)";
- $Replace1 = '"#".$1';
-
- $Search2 = "^(shell\\s+.+)";
- $Replace2 = '"#".$1';
-
- $Search3 = "^(login\\s+.+)";
- $Replace3 = '"#".$1';
-
- if (!&Patch::Patch($InetdConf, [[1, "Substitution", $Search1, $Replace1],
- [1, "Substitution", $Search2, $Replace2],
- [1, "Substitution", $Search3, $Replace3]])) {
- &ErrorMsg("Did not succeed with patch", $InetdConf);
- }
-
- # Modify the /etc/services file
- &ReadInstallGuide("$InstallGuideDir/GENERIC/unix");
- &unix;
-}
-
-sub unix {
- goto &OSFunix;
-}
-
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# An InstallGuide for installing the AFS aware file system checker
-# For Alpha systems running Digital Unix 3.x
-#
-
-sub vfsck {
-&ErrorsAreFatal(1);
-&Copy ("root.server/etc/vfsck", "/sbin/vfsck");
-&Copy ("root.server/etc/vfsck", "/usr/sbin/vfsck");
-&Symlink ("vfsck", "/sbin/ufs_fsck");
-&Symlink ("vfsck", "/usr/sbin/ufs_fsck");
-}
+++ /dev/null
-/*
- * Copyright 2000, International Business Machines Corporation and others.
- * All Rights Reserved.
- *
- * This software has been released under the terms of the IBM Public
- * License. For details, see the LICENSE file in the top-level source
- * directory or online at http://www.openafs.org/dl/license10.html
- */
-
-#
-# Initialization file for AFSinstall
-#
-#
-#
-# Alternate directories
-#
-default /afs/cellname/afsprod/3.4a
-prod /afs/cellname/afsprod/3.4a
-
-#
-# Install packages
-# file Default Description
-#
-modkernel 1 Dynamic kernel libraries and afsd
-bldkernel 0 Static kernel libraries and afsd
-fileserver 0 Fileserver
-dbserver 0 Database server
-miscserver 0 Other servers
-serveruser 0 Server control commands
-tokens 1 User tokens related commands
-unix 1 Modified unix commands
-debug 0 Debugging programs
-other 0 Other
-login 1 Install AFS integrated login
-vfsck 0 Install AFS aware vfsck
-build 0 Perform kernel build
-installkernel 0 Install AFS aware kernel
-rc 1 Create an AFS startup script
-clientconfig 1 Configuration of an AFS client
-
-#
-# Client configuration options
-#
-# option definition
-NFSEXTENSIONS=0
-CACHEDIR=/usr/vice/cache
-CACHESIZE=30000
-CELLNAME=cellname
-CELLSERVDB=/afs/cellname/cinfo/etc/CellServDB
-AFSROOT=/afs
-
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# An InstallGuide for configuration of an AFS client
-#
-
-sub clientconfig {
- my($cachefile, $cellfile, $dbfile, $replaced);
- my($afsroot, $cachedir, $cachesize, $cellname);
- my($config, $different, $line)
- &ErrorsAreFatal(1);
- &CreateDir("/usr/vice/etc");
- $cachefile = "/usr/vice/etc/cacheinfo";
- $cellfile = "/usr/vice/etc/ThisCell";
- $dbfile = "/usr/vice/etc/CellServDB";
-
- # Create a new cacheinfo file if it does not already exist
- if (! -r $cachefile) {
- $afsroot = $Configuration{"AFSROOT"};
- $cachedir = $Configuration{"CACHEDIR"};
- $cachesize = $Configuration{"CACHESIZE"};
- &ErrorMsg("AFSROOT not defined") if ($afsroot eq "");
- &ErrorMsg("CACHEDIR not defined") if ($cachedir eq "");
- &ErrorMsg("CACHESIZE not defined") if ($cachesize eq "");
- $config = "$afsroot:$cachedir:$cachesize";
-
- &CreateDir($cachedir);
-
- &CreateDir($afsroot);
- # the next 2 blocks of code will be used later when config
- # parameters can be passed through the GUI to override the
- # defaults
- if (-r $cachefile) {
- open(CONFIG, "$cachefile");
- $replaced = "$cachefile.old";
- chomp($line = <CONFIG>);
- $different = ($line ne $config);
- close CONFIG;
- }
- if (($replaced && $different) || !$replaced) {
- &VPrint("Creating new $cachefile");
- unlink($replaced) if ($replaced);
- rename($cachefile, $replaced) if ($replaced);
- open(CONFIGNEW, ">$cachefile") || &ErrorMsg("Can't open config file",
- $cachefile);
- print CONFIGNEW "$config\n";
- close CONFIGNEW;
- } else {
- &VPrint("$cachefile already created");
- }
- }
- $replaced = $different = 0;
-
- # create a new ThisCell file
- $cellname = $Configuration{"CELLNAME"};
- &ErrorMsg("CELLNAME not defined") if ($cellname eq "");
-
- if (-r $cellfile) {
- open(CELL, "$cellfile");
- $replaced = "$cellfile.old";
- chomp($line = <CELL>);
- $different = ($line ne $cellname);
- close CELL;
- }
- if (($replaced && $different) || !$replaced) {
- &VPrint("Creating new $cellfile");
- unlink($replaced) if ($replaced);
- rename($cellfile, $replaced) if ($replaced);
- open(CELLNEW, ">$cellfile") || &ErrorMsg("Can't open cell file",
- $cellfile);
- print CELLNEW "$cellname\n";
- close CELLNEW;
- } else {
- &VPrint("$cellfile already created");
- }
-
- # create a new CellServDB file
- $cellservdb = $Configuration{CELLSERVDB};
- &ErrorMsg("CELLSERVDB not defined") if ($cellservdb eq "");
- &Copy($cellservdb, $dbfile);
-}
-
-
-
-
-
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# An InstallGuide for database server processes
-#
-
-sub dbserver {
-&CreateDir ("/usr/afs/db", "/usr/afs/etc", "/usr/afs/local", "/usr/afs/logs");
-&ErrorsAreFatal(1);
-&CreateDir ("/usr/afs/bin");
-&ErrorsAreFatal(0);
-&Copy ("root.server/usr/afs/bin/bosserver", "/usr/afs/bin");
-&Copy ("root.server/usr/afs/bin/kaserver", "/usr/afs/bin");
-&Copy ("root.server/usr/afs/bin/vlserver", "/usr/afs/bin");
-&Copy ("root.server/usr/afs/bin/ptserver", "/usr/afs/bin");
-&Chmod(0744, "/usr/afs/bin/bosserver");
-&Chmod(0744, "/usr/afs/bin/kaserver");
-&Chmod(0744, "/usr/afs/bin/vlserver");
-&Chmod(0744, "/usr/afs/bin/ptserver");
-}
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# An InstallGuide for installing debugging programs
-#
-
-sub debug {
-&ErrorsAreFatal(1);
-&CreateDir ("/usr/vice/bin", "/usr/vice/etc/C", "/usr/afs/bin");
-&ErrorsAreFatal(0);
-&Copy ("bin/afsmonitor", "/usr/vice/bin");
-&Copy ("bin/cmdebug", "/usr/vice/bin");
-&Copy ("etc/fstrace", "/usr/vice/bin");
-&Copy ("etc/kdump", "/usr/vice/bin");
-&Copy ("etc/rxdebug", "/usr/vice/bin");
-&Copy ("bin/scout", "/usr/vice/bin");
-&Copy ("bin/udebug", "/usr/vice/bin");
-&Copy ("root.server/usr/afs/bin/volinfo", "/usr/afs/bin");
-&Copy ("root.client/usr/vice/etc/C/afszcm.cat", "/usr/vice/etc/C");
-&Chmod(0744, "/usr/afs/bin/volinfo");
-&Chmod(0744, "/usr/vice/bin/fstrace");
-&Chmod(0644, "/usr/vice/etc/C/afszcm.cat");
-}
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# An InstallGuide for fileserver processes
-#
-
-sub fileserver {
-&CreateDir ("/usr/afs/etc", "/usr/afs/local", "/usr/afs/logs");
-&ErrorsAreFatal(1);
-&CreateDir ("/usr/afs/bin");
-&ErrorsAreFatal(0);
-&Copy ("root.server/usr/afs/bin/bosserver", "/usr/afs/bin");
-&Copy ("root.server/usr/afs/bin/fileserver", "/usr/afs/bin");
-&Copy ("root.server/usr/afs/bin/volserver", "/usr/afs/bin");
-&Copy ("root.server/usr/afs/bin/salvager", "/usr/afs/bin");
-&Chmod(0744, "/usr/afs/bin/bosserver");
-&Chmod(0744, "/usr/afs/bin/fileserver");
-&Chmod(0744, "/usr/afs/bin/volserver");
-&Chmod(0744, "/usr/afs/bin/salvager");
-}
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# An InstallGuide for installing the AFS integrated login
-#
-
-sub login {
-&ErrorsAreFatal(1);
-&Copy("bin/login", "/bin/login.afs");
-&Symlink("login.afs", "/bin/login");
-}
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# An InstallGuide for fileserver processes
-#
-
-sub miscserver {
-&CreateDir ("/usr/afs/backup", "/usr/afs/etc");
-&CreateDir ("/usr/afs/local", "/usr/afs/logs");
-&ErrorsAreFatal(1);
-&CreateDir ("/usr/afs/bin");
-&ErrorsAreFatal(0);
-&Copy ("root.server/usr/afs/bin/buserver", "/usr/afs/bin");
-&Copy ("root.server/usr/afs/bin/upserver", "/usr/afs/bin");
-&Copy ("root.server/usr/afs/bin/upclient", "/usr/afs/bin");
-&Chmod(0744, "/usr/afs/bin/buserver");
-&Chmod(0744, "/usr/afs/bin/upserver");
-&Chmod(0744, "/usr/afs/bin/upclient");
-}
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# An InstallGuide for generic binaries not specifically listed in other
-# packages
-#
-
-sub other {
-$installdir = "/usr/afs/bin";
-
-&ErrorsAreFatal(1);
-&CreateDir($installdir);
-&ErrorsAreFatal(0);
-
-&Copy("bin/compile_et", $installdir);
-&Copy("bin/kpwvalid", $installdir);
-&Copy("bin/install", $installdir);
-&Copy("bin/pagsh", $installdir);
-&Copy("etc/rmtsysd", $installdir);
-&Copy("bin/rxgen", $installdir);
-&Copy("bin/sys", $installdir);
-&Copy("bin/up", $installdir);
-&Copy("bin/washtool", $installdir);
-&Copy("bin/xstat_cm_test", $installdir);
-&Copy("bin/xstat_fs_test", $installdir);
-}
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# An InstallGuide for AFS startup scripts
-#
-
-sub rc {
- &ErrorsAreFatal(1);
- $rc = open(RC, ">> /etc/rc.afs");
- &ErrorMsg("Can't append to file", "/etc/rc.afs") if (!$rc);
- print RC <<"EORC";
-#!/bin/sh
-#
-
-EORC
- close(rc);
- &Appendrc;
-}
-
-sub Appendrc {
- my($rmtsys, $otherrmtsys);
- &ErrorsAreFatal(1);
-
- if ($Configuration{"NFSEXTENSIONS"}) {
- $rmtsys = "-rmtsys";
- $otherrmtsys = ""; }
- else {
- $otherrmtsys = "-rmtsys";
- $rmtsys = ""; };
-
- $rc = open(RC, ">> /etc/rc.afs");
- &ErrorMsg("Can't append to file", "/etc/rc.afs") if (!$rc);
- print RC <<"EORC";
-# Choose one depending on how much usage this client gets
-#OPTIONS="-stat 300 -dcache 100 -daemons 2 -volumes 50"
-OPTIONS="-stat 2000 -dcache 800 -daemons 3 -volumes 70"
-#OPTIONS="-stat 2800 -dcache 2400 -daemons 5 -volumes 128"
-
-# Choose one depending on if you want this machine to be an NFS Translator
-NFS="$rmtsys"
-#NFS="$otherrmtsys"
-
-# Start bosserver
-if [ -x /usr/afs/bin/bosserver ]; then
- echo 'Starting bosserver' > /dev/console
- /usr/afs/bin/bosserver &
-fi
-
-# Start afsd
-/usr/vice/etc/afsd \$OPTIONS \$NFS
-
-# Start AFS inetd services
-if [ -f /etc/inetd.afs -a -f /etc/inetd.conf.afs ]; then
- /etc/inetd.afs /etc/inetd.conf.afs
-fi
-
-EORC
- close(RC);
-}
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# An InstallGuide for user programs for controlling server processes
-#
-
-sub serveruser {
-&CreateDir ("/usr/afs/bin");
-
-&Copy ("root.server/usr/afs/bin/bos", "/usr/afs/bin");
-&Copy ("root.server/usr/afs/bin/fs", "/usr/afs/bin");
-&Copy ("root.server/usr/afs/bin/kas", "/usr/afs/bin");
-&Copy ("root.server/usr/afs/bin/pts", "/usr/afs/bin");
-&Copy ("root.server/usr/afs/bin/vos", "/usr/afs/bin");
-
-&Copy ("etc/butc", "/usr/afs/bin");
-&Copy ("etc/backup", "/usr/afs/bin");
-&Copy ("root.server/usr/afs/bin/ntpdc", "/usr/afs/bin");
-}
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# An InstallGuide for installing tokens related commands
-#
-
-sub tokens {
-# Where commands get installed
-$installdir = "/usr/afs/bin";
-
-&ErrorsAreFatal(1);
-&CreateDir($installdir);
-&ErrorsAreFatal(0);
-
-&Copy("bin/klog", $installdir);
-&Copy("bin/knfs", $installdir);
-&Copy("bin/kpasswd", $installdir);
-&Copy("bin/pagsh", $installdir);
-&Copy("bin/tokens", $installdir);
-&Copy("bin/unlog", $installdir);
-}
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# An InstallGuide for the unix remote commands
-#
-
-sub unix {
- # append the ta-rauth to the services file
- $Services = "/etc/services";
- &ErrorsAreFatal(1);
- &Patch::Verbose if ($InstallVerbose);
- &Patch::FileOpen($Services);
-
- $ServicesAppend = "ta-rauth 601/tcp rauth";
-
- if (!&Patch::Patch($Services, [[0, "EOF", "", $ServicesAppend]])) {
- &ErrorMsg("Did not succeed with patch", $Services);
- }
-}
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# An InstallGuide for installing static AFS kernel libraries
-# For HP systems running HPUX 10.20
-#
-
-sub bldkernel {
-if ($Configuration{"NFSEXTENSIONS"}) {
- &Copy("root.client/bin/libafs.a", "/usr/conf/lib"); }
-else {
- &Copy("root.client/bin/libafs.nonfs.a", "/usr/conf/lib/libafs.a"); };
-
-&CreateDir("/usr/vice/etc");
-&Copy("root.client/usr/vice/etc/afsd", "/usr/vice/etc");
-&Chmod(0744, "/usr/vice/etc/afsd");
-&Copy("root.client/usr/vice/etc/afs.driver", "/usr/conf/master.d/afs");
-&Copy("bin/fs", "/usr/vice/etc/fs");
-
-
-# Patch the files
-&ErrorsAreFatal(1);
-$FILE="/stand/system";
-
-&Patch::Verbose if ($InstallVerbose);
-
-&Patch::FileOpen($FILE);
-
-$Search = <<"xxENDxx";
-nfs
-xxENDxx
-
-$Add = <<"xxENDxx";
-afs
-xxENDxx
-
-if (!&Patch::Patch($FILE, [[0, "Insert", $Search, $Add]])) {
- &ErrorMsg("Did not succeed with patch", $FILE);
-}
-}
-
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# An InstallGuide for compiling a new kernel
-# For HP 9000 systems running HPUX 10.20
-#
-
-sub build {
-print "Compiling with command \"/usr/sbin/mk_kernel\"\n";
-print "in directory /stand/build\n";
-print "New kernel will be /stand/build/vmunix_test\n";
-print "Install kernel as /stand/vmunix\n";
-
-&ErrorsAreFatal(1);
-$rc = chdir("/stand/build");
-&ErrorMsg("Could not change to dir", "/stand/build") if (!$rc);
-
-$rc = system("/usr/sbin/mk_kernel");
-$rc = $rc >> 8;
-print "Returned code $rc\n";
-}
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# An InstallGuide for installing a new kernel
-# For HP 9000 systems running HPUX 10.20
-#
-
-
-sub installkernel {
-&VersionCopyFile("/stand/build/vmunix_test", "/stand/vmunix");
-}
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# An InstallGuide for dynamic kernel loaded libraries
-# For HP 9000 systems running HPUX 9.x
-
-sub modkernel {
-&ErrorsAreFatal(1);
-&CreateDir("/usr/vice/etc/dkload");
-&ErrorsAreFatal(0);
-
-&Copy("root.client/usr/vice/etc/dkload/dkload", "/usr/vice/etc/dkload");
-&Copy("root.client/usr/vice/etc/dkload/libcommon.a", "/usr/vice/etc/dkload");
-
-if ($Configuration{"NFSEXTENSIONS"}) {
- &Copy("root.client/usr/vice/etc/dkload/libafs.a", "/usr/vice/etc/dkload"); }
-else {
- &Copy("root.client/usr/vice/etc/dkload/libafs.nonfs.a",
- "/usr/vice/etc/dkload"); };
-
-&Copy("root.client/usr/vice/etc/afsd", "/usr/vice/etc");
-&Chmod(0744, "/usr/vice/etc/afsd");
-&Copy("bin/fs", "/usr/vice/etc/fs");
-}
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# An InstallGuide for installing the initialization script
-# For HP 9000 systems running HPUX 9.x
-#
-
-sub rc {
-# Defaults
-$rcfile = "/etc/rc";
-
-# Add AFS kernel loader to RC file
-&VPrint("Updating $rcfile file");
-&ErrorsAreFatal(1);
-&DisplaceFile("/etc/rc.afs");
-
-# Append the generic RC file
-&ReadInstallGuide("$InstallGuideDir/GENERIC/rc");
-&Appendrc;
-
-# Read in the current RC file
-$Section = "rc";
-$rc = open(RC, $rcfile);
-&ErrorMsg("Could not read file", $rcfile) if (!$rc);
-@line = <RC>;
-close(RC);
-
-# Check if AFS is already referenced
-if (grep(/\bAFS\b/, @line) || grep(/\/usr\/vice\/etc/, @line)) {
- &Print("AFS appears to already be in $rcfile");
- return; };
-
-# Find where function localrc() is. If it is not there, put it in after
-# all of the leading comments
-$localrc = -1;
-$comments = 0;
-foreach $n (0 ... $#line) {
- $comments = $n unless (@line[$n] =~ /^#/ || $comments > 0);
- if (@line[$n] =~ /^localrc\(\)/) {
- $localrc = $n;
- last; }; };
-
-# Insert a localrc() function if one was not already there
-if ($localrc == -1) {
- splice(@line, $comments, 0, "localrc()\n", "{\n", "}\n", "\n");
- $localrc = $comments;
- &Print("Inserted function localrc() in $rcfile");
- &Print("This should be run after NFS is started"); };
-
-# Skip past the function name and opening curly brace. Account for "{}"
-until (@line[$localrc] =~ /\{/ || $localrc > $#line) { $localrc ++; };
-if (@line[$localrc] =~ /\}/) {
- @line[$localrc] =~ s/\}//;
- splice(@line, $localrc+1, 0, "}\n"); };
-$localrc++;
-
-# Insert a call to the AFS rc file
-splice(@line, $localrc, 0,
- "\# Start AFS\n",
- "if [ -f /etc/rc.afs ]; then\n",
- " /bin/sh /etc/rc.afs\n",
- "fi\n");
-
-# Rewrite the RC file
-$rc = open(RC, "> $rcfile");
-&ErrorMsg("Could not rewrite file" , $rcfile) if (!$rc);
-foreach $line (@line) {
- print RC $line; };
-close(RC);
-}
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# An InstallGuide for the AFS modified Unix commands
-#
-
-sub HPunix {
- &Copy("etc/inetd", "/etc/inetd.afs");
- &Copy("etc/ftpd", "/etc/ftpd.afs");
- &Copy("etc/rexecd", "/etc/rexecd.afs");
- &Copy("etc/rlogind", "/etc/rlogind.afs");
-
- &ErrorsAreFatal(1);
- &Patch::Verbose if ($InstallVerbose);
- &CreateDir("/usr/vice/bin");
-
- &Copy("bin/rcp", "/usr/vice/bin");
- &Chown (0,2, "/usr/vice/bin/rcp");
- &Chmod (04755, "/usr/vice/bin/rcp");
-
- &Copy("bin/remsh", "/usr/vice/bin");
- &Chown (0,2, "/usr/vice/bin/remsh");
- &Chmod (04755, "/usr/vice/bin/remsh");
-
- # Create the inetd.conf.afs file
- $InetdConfAfs = "/etc/inetd.conf.afs";
- open(INETD, ">$InetdConfAfs") || &ErrorMsg("Can't open file", $InetdConfAfs);
- print INETD <<"EOINETD";
-ftp stream tcp nowait root /etc/ftpd.afs ftpd.afs
-shell stream tcp nowait root /etc/remshd remshd
-login stream tcp nowait root /etc/rlogind.afs rlogind.afs
-ta-rauth stream tcp nowait root internal ta-rauth
-exec stream tcp nowait root /etc/rexecd.afs rexecd.afs
-EOINETD
-
- # comment out the rshd line in inetd.conf
- $InetdConf = "/etc/inetd.conf";
- &CopyStat($InetdConf, $InetdConfAfs);
- &Patch::FileOpen($InetdConf);
-
- $Search1 = "^(ftp\\s+.+)";
- $Replace1 = '"#".$1';
-
- $Search2 = "^(shell\\s+.+)";
- $Replace2 = '"#".$1';
-
- $Search3 = "^(login\\s+.+)";
- $Replace3 = '"#".$1';
-
- $Search4 = "^(exec\\s+.+)";
- $Replace4 = '"#".$1';
-
- if (!&Patch::Patch($InetdConf, [[1, "Substitution", $Search1, $Replace1],
- [1, "Substitution", $Search2, $Replace2],
- [1, "Substitution", $Search3, $Replace3],
- [1, "Substitution", $Search4, $Replace4]])) {
- &ErrorMsg("Did not succeed with patch", $InetdConf);
- }
-
- # Modify the /etc/services file
- &ReadInstallGuide("$InstallGuideDir/GENERIC/unix");
- &unix;
-}
-
-sub unix {
- goto &HPunix;
-}
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# An InstallGuide for installing the AFS aware file system checker
-# For HP 9000 series systems running HPUX 9.x
-#
-
-sub vfsck {
-&ErrorsAreFatal(1);
-&Copy ("root.server/etc/vfsck", "/etc/vfsck");
-&Symlink ("vfsck", "/etc/fsck");
-}
+++ /dev/null
-/*
- * Copyright 2000, International Business Machines Corporation and others.
- * All Rights Reserved.
- *
- * This software has been released under the terms of the IBM Public
- * License. For details, see the LICENSE file in the top-level source
- * directory or online at http://www.openafs.org/dl/license10.html
- */
-
-#
-# Initialization file for AFSinstall
-#
-#
-#
-# Alternate directories
-#
-
-
-#
-# Install packages
-# file Default Description
-#
-modkernel 0 Dynamic kernel libraries and afsd
-bldkernel 1 Static kernel libraries and afsd
-build 1 Perform kernel build
-installkernel 1 Install AFS aware kernel
-
-
-#
-# Client configuration options
-#
-# option definition
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# An InstallGuide for installing static AFS kernel libraries
-# For HP systems running HPUX 10.x
-#
-
-sub bldkernel {
-if ($Configuration{"NFSEXTENSIONS"}) {
- &Copy("root.client/bin/libafs.a", "/etc/conf/lib/libafs.a"); }
-else {
- &Copy("root.client/bin/libafs.nonfs.a", "/etc/conf/lib/libafs.a"); };
-
-&CreateDir("/usr/vice/etc");
-&Copy("root.client/usr/vice/etc/afsd", "/usr/vice/etc");
-&Chmod(0744, "/usr/vice/etc/afsd");
-&Copy("bin/fs", "/usr/vice/etc/fs");
-}
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# An InstallGuide for compiling a new kernel
-# For HP systems running HP-UX 10.x
-#
-
-sub build {
-my ($hostname);
-$hostname = `/bin/uname -n`;
-chop $hostname;
-$hostname = tr/a-z/A-Z/;
-&Print("Compiling with command \"/usr/sbin/config -m master.d $hostname"\"");
-&Print("in directory /stand/build_afs");
-&Print("New kernel will be /stand/build_afs/vmunix_test");
-&Print("Install kernel as /stand/vmunix");
-
-&ErrorsAreFatal(1);
-$rc = chdir("/stand/build_afs");
-&ErrorMsg("Could not change to dir", "/stand/build_afs") if (!$rc);
-
-$rc = system("/usr/sbin/config -m master.d $hostname");
-$rc = $rc >> 8;
-&Print("Returned code $rc");
-}
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# An InstallGuide for installing the initialization script
-# For HP 9000 series systems running HPUX 10.X
-#
-
-sub rc {
-&Copy("root.client/usr/vice/etc/dkload/afs.rc", "/sbin/init.d/afs");
-&Chmod (0555, "/sbin/init.d/afs");
-&Symlink("../init.d/afs", "/sbin/rc2.d/K800afs");
-&Symlink("../init.d/afs", "/sbin/rc2.d/S460afs");
-}
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# An InstallGuide for the AFS modified Unix commands
-#
-
-sub HPunix {
- &Copy("etc/inetd", "/usr/sbin/inetd.afs");
- &Symlink("/usr/sbin/inetd.afs", "/etc/inetd.afs");
- &Copy("etc/ftpd", "/usr/lbin/ftpd.afs");
- &Copy("etc/rlogind", "/usr/lbin/rlogind.afs");
-
- &ErrorsAreFatal(1);
- &Patch::Verbose if ($InstallVerbose);
- &CreateDir("/usr/vice/bin");
-
- &Copy("bin/rcp", "/usr/vice/bin");
- &Chown (0,2, "/usr/vice/bin/rcp");
- &Chmod (04755, "/usr/vice/bin/rcp");
-
- &Copy("bin/remsh", "/usr/vice/bin");
- &Chown (0,2, "/usr/vice/bin/remsh");
- &Chmod (04755, "/usr/vice/bin/remsh");
-
- # Create the inetd.conf.afs file
- $InetdConfAfs = "/etc/inetd.conf.afs";
- open(INETD, ">$InetdConfAfs") || &ErrorMsg("Can't open file", $InetdConfAfs);
- print INETD <<"EOINETD";
-ftp stream tcp nowait root /usr/lbin/ftpd.afs ftpd.afs
-shell stream tcp nowait root /usr/lbin/remshd remshd
-login stream tcp nowait root /usr/lbin/rlogind.afs rlogind.afs
-ta-rauth stream tcp nowait root internal ta-rauth
-EOINETD
-
- # comment out the rshd line in inetd.conf
- $InetdConf = "/etc/inetd.conf";
-
- &Patch::FileOpen($InetdConf);
- &CopyStat($InetdConf, $InetdConfAfs);
- $Search1 = "^(ftp\\s+.+)";
- $Replace1 = '"#".$1';
-
- $Search2 = "^(shell\\s+.+)";
- $Replace2 = '"#".$1';
-
- $Search3 = "^(login\\s+.+)";
- $Replace3 = '"#".$1';
-
- if (!&Patch::Patch($InetdConf, [[1, "Substitution", $Search1, $Replace1],
- [1, "Substitution", $Search2, $Replace2],
- [1, "Substitution", $Search3, $Replace3]])) {
- &ErrorMsg("Did not succeed with patch", $InetdConf);
- }
-
- # Modify the /etc/services file
- &ReadInstallGuide("$InstallGuideDir/GENERIC/unix");
- &unix;
-}
-
-sub unix {
- goto &HPunix;
-}
-
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# An InstallGuide for installing the AFS aware file system checker
-# For HP systems running HPUX 10.x
-#
-
-sub vfsck {
-&ErrorsAreFatal(1);
-&Copy ("root.server/etc/vfsck", "/sbin/fs/hfs/vfsck");
-&Symlink ("vfsck", "/sbin/fs/hfs/fsck");
-}
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# An InstallGuide for AFS integrated login on rs_aix32 systems
-#
-
-sub login {
-&ErrorsAreFatal(1);
-&Symlink ("login.noafs", "/bin/login");
-&Symlink ("../bin/login", "/etc/getty");
-&Symlink ("../bin/login", "/etc/tsm");
-&Symlink ("../bin/login.afs", "/etc/afsok");
-&Copy ("bin/login.noafs", "/bin/login.noafs");
-&Copy ("bin/login.afs", "/bin/login.afs");
-&Copy ("bin/login.afs.krb", "/bin/login.afs.krb");
-}
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# An InstallGuide for dynamic kernel loaded libraries
-# For IBM RS/6000 systems running AIX 3.x
-
-sub modkernel {
-&ErrorsAreFatal(1);
-&CreateDir("/usr/vice/etc/dkload");
-&ErrorsAreFatal(0);
-
-if ($Configuration{"NFSEXTENSIONS"}) {
- &Copy("root.client/usr/vice/etc/dkload/afs.ext.trans",
- "/usr/vice/etc/dkload");
- &Copy("root.client/usr/vice/etc/dkload/cfgafs", "/usr/vice/etc/dkload");
- &Copy("root.client/usr/vice/etc/dkload/cfgexport", "/usr/vice/etc/dkload");
- &Copy("root.client/usr/vice/etc/dkload/export.ext","/usr/vice/etc/dkload"); }
-else {
- &Copy("root.client/usr/vice/etc/dkload/afs.ext", "/usr/vice/etc/dkload");
- &Copy("root.client/usr/vice/etc/dkload/cfgafs", "/usr/vice/etc/dkload");
- &Copy("root.client/usr/vice/etc/dkload/cfgexport", "/usr/vice/etc/dkload");
- &Copy("root.client/usr/vice/etc/dkload/export.ext.nonfs",
- "/usr/vice/etc/dkload"); }
-
-&Copy("root.client/usr/vice/etc/afsd", "/usr/vice/etc");
-&Chmod(0744, "/usr/vice/etc/afsd");
-&Copy("bin/fs", "/usr/vice/etc/fs");
-}
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# An InstallGuide for installing the initialization script
-# For IBM RS/6000 systems running AIX 3.x
-#
-
-sub AIXrc {
-
-# Defaults
-$rcfile = "/etc/rc.afs";
-$initfile = "/etc/inittab";
-
-&ErrorsAreFatal(1);
-
-# Add AFS kernel loader to RC file
-&VPrint("Creating $rcfile file");
-&DisplaceFile($rcfile);
-$rc = open(RC, "> $rcfile");
-&ErrorMsg("Could not overwrite", $rcfile) if (!$rc);
-
-print RC <<"EORC";
-#!/bin/sh
-
-USENFS=\"$Configuration{"NFSEXTENSIONS"}\"
-
-if [ \"\$NFS\" = 1 ]; then
- ExportExt=\"\"
- AFSExt=\".trans\"
-else
- ExportExt=\".nonfs\"
- AFSExt=\"\"
-fi
-
-# Load AFS into the kernel
-/usr/vice/etc/dkload/cfgexport -a /usr/vice/etc/dkload/export.ext\${ExportExt}
-/usr/vice/etc/dkload/cfgafs -a /usr/vice/etc/dkload/afs.ext\${AFSExt}
-
-EORC
-close(RC);
-
-# Append the generic RC file
-&ReadInstallGuide("$InstallGuideDir/GENERIC/rc");
-&Appendrc;
-
-# Add AFS entry to the inittab file
-&VPrint("Adding AFS entry to $initfile");
-
-&Patch::Verbose if ($InstallVerbose);
-&Patch::FileOpen($initfile);
-$SearchString = <<"xxENDxx";
-rcnfs:2:wait:/etc/rc.nfs > /dev/console 2>&1 # Start NFS Daemons
-xxENDxx
-
-$NewString = <<"xxENDxx";
-rcafs:2:wait:/etc/rc.afs > /dev/console 2>&1 # Start AFS daemons
-xxENDxx
-
-if (!&Patch::Patch($initfile, [[0, "Insert", $SearchString, $NewString]])) {
- &ErrorMsg("Did not succeed with patch", $initfile); }
-}
-
-
-
-
-sub rc {
-goto &AIXrc;
-}
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# An InstallGuide for the AFS modified Unix commands
-#
-
-sub AIXunix {
- &Copy("etc/inetd", "/usr/sbin/inetd.afs");
- &Copy("etc/ftpd", "/usr/sbin/ftpd.afs");
- &Copy("etc/rlogind", "/usr/sbin/rlogind.afs");
- &Symlink ("/usr/sbin/inetd.afs", "/etc/inetd.afs");
- &Symlink ("/usr/sbin/ftpd.afs", "/etc/ftpd.afs");
- &Symlink ("/usr/sbin/rlogind.afs", "/etc/rlogind.afs");
-
- &ErrorsAreFatal(1);
- &Patch::Verbose if ($InstallVerbose);
- &CreateDir("/usr/vice/bin");
-
- &Copy("bin/rcp", "/usr/vice/bin");
- &Chown (0,2, "/usr/vice/bin/rcp");
- &Chmod (04755, "/usr/vice/bin/rcp");
-
- &Copy("bin/rsh", "/usr/vice/bin");
- &Chown (0,2, "/usr/vice/bin/rsh");
- &Chmod (04755, "/usr/vice/bin/rsh");
-
- # Create the inetd.conf.afs file
- $InetdConfAfs = "/etc/inetd.conf.afs";
- open(INETD, ">$InetdConfAfs") || &ErrorMsg("Can't open file", $InetdConfAfs);
- print INETD <<"EOINETD";
-ftp stream tcp nowait root /etc/ftpd.afs ftpd.afs
-shell stream tcp nowait root /etc/rshd rshd
-login stream tcp nowait root /etc/rlogind.afs rlogind.afs
-ta-rauth stream tcp nowait root internal ta-rauth
-EOINETD
-
- # comment out the rshd line in inetd.conf
- $InetdConf = "/etc/inetd.conf";
- &CopyStat($InetdConf, $InetdConfAfs);
- &Patch::FileOpen($InetdConf);
-
- $Search1 = "^(ftp\\s+.+)";
- $Replace1 = '"#".$1';
-
- $Search2 = "^(shell\\s+.+)";
- $Replace2 = '"#".$1';
-
- $Search3 = "^(login\\s+.+)";
- $Replace3 = '"#".$1';
-
- if (!&Patch::Patch($InetdConf, [[1, "Substitution", $Search1, $Replace1],
- [1, "Substitution", $Search2, $Replace2],
- [1, "Substitution", $Search3, $Replace3]])) {
- &ErrorMsg("Did not succeed with patch", $InetdConf);
- }
-
- # Modify the /etc/services file
- &ReadInstallGuide("$InstallGuideDir/GENERIC/unix");
- &unix;
-}
-
-sub unix {
- goto &AIXunix;
-}
-
-
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# An InstallGuide for installing the AFS aware file system checker
-# For RS/6000 systems running AIX 3.x
-#
-
-sub vfsck {
-&Copy("root.server/etc/v3fshelper", "/sbin/helpers");
-}
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# An InstallGuide for AFS login
-# For IBM RS/6000 systems running AIX 4.x
-#
-
-sub login {
- &Copy ("root.client/usr/vice/etc/afs_dynamic_auth", "/usr/vice/etc");
- &Copy ("root.client/usr/vice/etc/afs_dynamic_kerbauth", "/usr/vice/etc");
-
- $File1="/etc/security/user";
- $File2="/etc/security/login.cfg";
- &Patch::Verbose if ($InstallVerbose);
- &Patch::FileOpen($File1);
- &Patch::FileOpen($File2);
-
- $Search = << "xxENDxx";
- expires = 0
- SYSTEM = "compat"
-xxENDxx
-
- $New = << "xxENDxx";
- expires = 0
- SYSTEM = "AFS OR (AFS[UNAVAIL] OR compat[SUCCESS])"
- registry = DCE
-xxENDxx
-
- $Search1 = << "xxENDxx";
-root:
-xxENDxx
-
- $New1 = << "xxENDxx";
-root:
- registry = files
-xxENDxx
-
- $New2 = << "xxENDxx";
-rootl:
- admin = true
- SYSTEM = "compat"
- loginretries = 0
- registry = files
- account_locked = false
-
-xxENDxx
-
- $Search3 = << "xxENDxx";
-daemon:
- admin = true
- expires = 0101000070
-xxENDxx
-
- $New3 = << "xxENDxx";
-daemon:
- admin = true
- account_locked = false
-xxENDxx
-
- if (!&Patch::Patch($File1, [[0, "Replace", $Search, $New],
- [0, "Replace", $Search1, $New1],
- [0, "EOF", "", $New2],
- [0, "Replace", $Search3, $New3]])) {
- &VPrint("Did not succeed in patching $File1");
- }
-
- $New = << "xxENDxx";
-DCE:
- program = /usr/vice/etc/afs_dynamic_auth
-
-AFS:
- program = /usr/vice/etc/afs_dynamic_auth
- retry = 3
- timeout = 30
- retry_delay = 10
-xxENDxx
-
- if (!&Patch::Patch($File2, [[0, "EOF", "", $New]])) {
- &VPrint("Did not succeed in patching $File2");
- }
-
-}
-
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# An InstallGuide for dynamic kernel loaded libraries
-# For IBM RS/6000 systems running AIX 4.x
-#
-
-sub modkernel {
- my($useiauth,$afsext,$export, $line, $a,$b,$c);
- &ErrorsAreFatal(1);
- &CreateDir("/usr/vice/etc/dkload");
- &ErrorsAreFatal(0);
-
- if ($Configuration{"NFSEXTENSIONS"}) {
- # Determine if this AIX system uses the iauth system
- # AIX 4.1.x for x>=5
- # AIX 4.2.x for x>=1
- # AIX 4.x for x>=3
- $useiauth = 0;
- open(LPP, "/bin/lslpp -L |");
- while ($line = <LPP>) {
- next unless ($line =~ /bos.rte\s/);
- $line =~ /bos.rte\s+(\d)\.(\d)\.(\d)/;
- ($a,$b,$c) = ($1,$2,$3);
- $useiauth = 1 if ($a == 4 && $b == 1 && $c >= 5);
- $useiauth = 1 if ($a == 4 && $b == 2 && $c >= 1);
- $useiauth = 1 if ($a == 4 && $b >= 3);
- last; };
- close(LPP);
-
- if ($useiauth) {
- $export=".nonfs";
- $afsext="iauth"; }
- else {
- $export="";
- $afsext="trans"; }
-
- # Copy NFS ready kernel extensions into place
- &Copy("root.client/usr/vice/etc/dkload/cfgafs", "/usr/vice/etc/dkload");
- &Copy("root.client/usr/vice/etc/dkload/cfgexport", "/usr/vice/etc/dkload");
- &Copy("root.client/usr/vice/etc/dkload/afs.ext.$afsext",
- "/usr/vice/etc/dkload");
- &Copy("root.client/usr/vice/etc/dkload/export.ext$export",
- "/usr/vice/etc/dkload"); }
- else {
- # Copy non NFS ready kernel extensions into place
- &Copy("root.client/usr/vice/etc/dkload/afs.ext", "/usr/vice/etc/dkload");
- &Copy("root.client/usr/vice/etc/dkload/cfgafs", "/usr/vice/etc/dkload");
- &Copy("root.client/usr/vice/etc/dkload/cfgexport", "/usr/vice/etc/dkload");
- &Copy("root.client/usr/vice/etc/dkload/export.ext.nonfs",
- "/usr/vice/etc/dkload"); }
-
- &Copy("root.client/usr/vice/etc/afsd", "/usr/vice/etc");
-&Chmod(0744, "/usr/vice/etc/afsd");
- &Copy("bin/fs", "/usr/vice/etc/fs");
-
- $File="/etc/vfs";
- $Patch::Verbose if ($InstallVerbose);
-
- &Patch::FileOpen($File);
-
- $Search = << "xxENDxx";
-nfs 2 /sbin/helpers/nfsmnthelp none remote
-xxENDxx
-
- $New = << "xxENDxx";
-afs 4 none none
-xxENDxx
-
- if (!&Patch::Patch($File, [[0, "Insert", $Search, $New]])) {
- &ErrorMsg("Did not succeed in patching $File");
- }
-}
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# An InstallGuide for installing the initialization script
-# For IBM RS/6000 systems running AIX 4.x
-#
-
-sub rc {
-my($rcfile,$initfile, $method,$line,$method,%Method);
-
-# Defaults
-$rcfile = "/etc/rc.afs";
-$initfile = "/etc/inittab";
-
-&ErrorsAreFatal(1);
-
-# Add AFS kernel loader to RC file
-&VPrint("Creating $rcfile file");
-&DisplaceFile($rcfile);
-$rc = open(RC, "> $rcfile");
-&ErrorMsg("Could not overwrite", $rcfile) if (!$rc);
-
-
-$method = "none";
-if ($Configuration{"NFSEXTENSIONS"}) {
- $method = "nfs";
- # Determine if this AIX system uses the iauth system
- # AIX 4.1.x for x>=5
- # AIX 4.2.x for x>=1
- # AIX 4.x for x>=3
- open(LPP, "/bin/lslpp -L |");
- while ($line = <LPP>) {
- next unless ($line =~ /bos.rte\s/);
- $line =~ /bos.rte\s+(\d)\.(\d)\.(\d)/;
- ($a,$b,$c) = ($1,$2,$3);
- $method = "iauth" if ($a == 4 && $b == 1 && $c >= 5);
- $method = "iauth" if ($a == 4 && $b == 2 && $c >= 1);
- $method = "iauth" if ($a == 4 && $b >= 3);
- last; };
- close(LPP); };
-
-$Method{"none"} = "#USENFS=\"none\"";
-$Method{"nfs"} = "#USENFS=\"nfs\"";
-$Method{"iauth"} = "#USENFS=\"iauth\"";
-$Method{$method} =~ s:#::;
-
-print RC <<"EORC";
-#!/bin/sh
-
-
-# Choose one depending on how much usage this client gets
-#OPTIONS="-stat 300 -dcache 100 -daemons 2 -volumes 50"
-#OPTIONS="-stat 2000 -dcache 800 -daemons 3 -volumes 70"
-OPTIONS="-stat 2800 -dcache 2400 -daemons 5 -volumes 128"
-
-# Choose one depending on how you want NFS requests handled by AFS
-$Method{"none"}
-$Method{"nfs"}
-$Method{"iauth"}
-
-if [ "\$USENFS" = "nfs" ]; then
- ExportExt=""
- AFSExt=".trans"
- NFS="-rmtsys"
-elif [ "\$USENFS" = "iauth" ]; then
- ExportExt=".nonfs"
- AFSExt=".iauth"
- NFS="-rmtsys"
-else
- ExportExt=".nonfs"
- AFSExt=""
- NFS=""
-fi
-
-# Load AFS into the kernel
-cd /usr/vice/etc/dkload
-/usr/vice/etc/dkload/cfgexport -a /usr/vice/etc/dkload/export.ext\${ExportExt}
-/usr/vice/etc/dkload/cfgafs -a /usr/vice/etc/dkload/afs.ext\${AFSExt}
-
-# Start bosserver
-if [ -x /usr/afs/bin/bosserver ]; then
- echo 'Starting bosserver' > /dev/console
- /usr/afs/bin/bosserver &
-fi
-
-# Start afsd
-/usr/vice/etc/afsd \$OPTIONS \$NFS
-
-# Start AFS inetd services
-if [ -f /etc/inetd.afs -a -f /etc/inetd.conf.afs ]; then
- /etc/inetd.afs /etc/inetd.conf.afs
-fi
-
-EORC
-close(RC);
-
-# Add AFS entry to the inittab file
-&VPrint("Adding AFS entry to $initfile");
-
-&Patch::Verbose if ($InstallVerbose);
-&Patch::FileOpen($initfile);
-$SearchString = <<"xxENDxx";
-rcnfs:2:wait:/etc/rc.nfs > /dev/console 2>&1 # Start NFS Daemons
-xxENDxx
-
-$NewString = <<"xxENDxx";
-rcafs:2:wait:/etc/rc.afs > /dev/console 2>&1 # Start AFS Daemons
-xxENDxx
-
-if (!&Patch::Patch($initfile, [[0, "Insert", $SearchString, $NewString]])) {
- &ErrorMsg("Did not succeed with patch", $initfile);
-}
-&Chmod (0755, $rcfile);
-&Chown (0,0, $rcfile);
-}
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# An InstallGuide for the AFS modified Unix commands
-# For IBM RS/6000 systems running AIX 4.x
-#
-
-sub AIXunix {
- &Copy("etc/inetd", "/usr/sbin/inetd.afs");
- &Symlink("/usr/sbin/inetd.afs", "/etc/inetd.afs");
- &Copy("etc/ftpd", "/usr/sbin/ftpd.afs");
-
- &ErrorsAreFatal(1);
- &Patch::Verbose if ($InstallVerbose);
- &CreateDir("/usr/vice/bin");
-
- &Copy("bin/rcp", "/usr/vice/bin");
- &Chown (0,2, "/usr/vice/bin/rcp");
- &Chmod (04755, "/usr/vice/bin/rcp");
-
- &Copy("bin/rsh", "/usr/vice/bin");
- &Chown (0,2, "/usr/vice/bin/rsh");
- &Chmod (04755, "/usr/vice/bin/rsh");
-
- # Create the inetd.conf.afs file
- $InetdConfAfs = "/etc/inetd.conf.afs";
- open(INETD, ">$InetdConfAfs") || &ErrorMsg("Can't open file", $InetdConfAfs);
- print INETD <<"EOINETD";
-ftp stream tcp nowait root /usr/sbin/ftpd.afs ftpd.afs
-shell stream tcp nowait root /usr/sbin/rshd rshd
-login stream tcp nowait root /usr/sbin/rlogind.afs rlogind.afs
-ta-rauth stream tcp nowait root internal ta-rauth
-EOINETD
-
- # comment out the rshd line in inetd.conf
- $InetdConf = "/etc/inetd.conf";
- &CopyStat($InetdConf, $InetdConfAfs);
- &Patch::FileOpen($InetdConf);
-
- $Search1 = "^(ftp\\s+.+)";
- $Replace1 = '"#".$1';
-
- $Search2 = "^(shell\\s+.+)";
- $Replace2 = '"#".$1';
-
- $Search3 = "^(login\\s+.+)";
- $Replace3 = '"#".$1';
-
- if (!&Patch::Patch($InetdConf, [[1, "Substitution", $Search1, $Replace1],
- [1, "Substitution", $Search2, $Replace2],
- [1, "Substitution", $Search3, $Replace3]])) {
- &ErrorMsg("Did not succeed with patch", $InetdConf);
- }
-
- # Modify the /etc/services file
- &ReadInstallGuide("$InstallGuideDir/GENERIC/unix");
- &unix;
-}
-
-sub unix {
- goto &AIXunix;
-}
-
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# An InstallGuide for installing the AFS aware file system checker
-# For IBM RS/6000 systems running AIX 4.x
-#
-
-sub vfsck {
-&Copy("root.server/etc/v3fshelper", "/sbin/helpers");
-}
+++ /dev/null
-/*
- * Copyright 2000, International Business Machines Corporation and others.
- * All Rights Reserved.
- *
- * This software has been released under the terms of the IBM Public
- * License. For details, see the LICENSE file in the top-level source
- * directory or online at http://www.openafs.org/dl/license10.html
- */
-
-#
-# Initialization file for AFSinstall
-#
-#
-#
-# Alternate directories
-#
-
-#
-# Install packages
-# file Default Description
-#
-modkernel 0 Dynamic kernel libraries and afsd
-bldkernel 1 Static kernel libraries and afsd
-build 1 Perform kernel build
-installkernel 1 Install AFS aware kernel
-
-
-#
-# Client configuration options
-#
-# option definition
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# An InstallGuide for installing static AFS kernel libraries
-# For SGI systems running IRIX 5.x
-#
-
-sub bldkernel {
-my ($chip, $chipcount, $nfs, $libafs);
-&ErrorsAreFatal(1);
-
-# Find out what kind of chip the machine has (Rx000)
-$chip = `hinv -t cpu`;
-$chip =~ /R[34][046]0*/;
-$chip = $&;
-&ErrorMsg("Could not determine chip type with", "hinv") unless ($chip =~ /^R/);
-
-# Find out if there is more than one processor (eg "2 150 MHZ IP19 Processors")
-$chipcount = `hinv -c processor`;
-$chipcount =~ s/ .*//;
-&ErrorMsg("Could not determine chip count with", "hinv") unless ($chipcount);
-
-# NFS support
-if ($Configuration{"NFSEXTENSIONS"}) {
- $nfs = ""; }
-else {
- $nfs = ".nonfs"; };
-
-# From the above, put together the name of the kernel library to use
-$libafs = "libafs.SP.$chip$nfs.a" if ($chipcount == 1);
-$libafs = "libafs.MP.$chip$nfs.a" if ($chipcount > 1);
-
-&CreateDir("/usr/vice/etc/sgiload");
-&ErrorsAreFatal(0);
-&Copy("root.client/bin/$libafs", "/var/sysgen/boot/afs.a");
-&Copy("root.client/usr/vice/etc/sgiload/afs", "/usr/vice/etc/sgiload");
-&Copy("root.client/usr/vice/etc/sgiload/afs.rc", "/usr/vice/etc/sgiload");
-&Copy("root.client/usr/vice/etc/sgiload/afs.sm", "/usr/vice/etc/sgiload");
-
-&Copy("root.client/usr/vice/etc/afsd", "/usr/vice/etc");
-&Chmod(0744, "/usr/vice/etc/afsd");
-
-system("/etc/chkconfig -f afsml off");
-&Copy("bin/fs", "/usr/vice/etc/fs");
-}
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# An InstallGuide for dynamic kernel loaded libraries
-# For SGI systems running IRIX 5.x
-#
-
-sub modkernel {
-my ($chip, $chipcount, $nfs, $libafs);
-&ErrorsAreFatal(1);
-
-# Find out what kind of chip the machine has (Rx000)
-$chip = `hinv -t cpu`;
-$chip =~ /R[34][046]0*/;
-$chip = $&;
-$chip =~ s/5/4/;
-&ErrorMsg("Could not determine chip type with", "hinv") unless ($chip =~ /^R/);
-
-# Find out if there is more than one processor (eg "2 150 MHZ IP19 Processors")
-$chipcount = `hinv -c processor`;
-$chipcount =~ s/ .*//;
-&ErrorMsg("Could not determine chip count with", "hinv") unless ($chipcount);
-
-# NFS support
-if ($Configuration{"NFSEXTENSIONS"}) {
- $nfs = ""; }
-else {
- $nfs = ".nonfs"; };
-
-# From the above, put together the name of the kernel library to use
-$libafs = "libafs.SP.$chip$nfs.o" if ($chipcount == 1);
-$libafs = "libafs.MP.$chip$nfs.o" if ($chipcount > 1);
-
-&CreateDir("/usr/vice/etc/sgiload");
-&ErrorsAreFatal(0);
-&Copy("root.client/usr/vice/etc/sgiload/$libafs", "/usr/vice/etc/sgiload");
-&Copy("root.client/usr/vice/etc/sgiload/afs", "/usr/vice/etc/sgiload");
-&Copy("root.client/usr/vice/etc/sgiload/afs.rc", "/usr/vice/etc/sgiload");
-&Copy("root.client/usr/vice/etc/sgiload/afs.sm", "/usr/vice/etc/sgiload");
-
-&Copy("root.client/usr/vice/etc/afsd", "/usr/vice/etc");
-&Chmod(0744, "/usr/vice/etc/afsd");
-
-system("/etc/chkconfig -f afsml on");
-&Copy("bin/fs", "/usr/vice/etc/fs");
-}
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# An InstallGuide for static AFS kernel libraries
-# For SGI systems running IRIX 6.x
-#
-
-sub bldkernel {
-my($chip, $ip_type, $os_vers, $chipcount, $nfs, $libafs);
-&ErrorsAreFatal(1);
-
-# Find out what kind of chip the machine has (Rx000)
-$chip = `hinv -t cpu`;
-$chip =~ /R[4581][046]0*/;
-$chip = $&;
-&ErrorMsg("Could not determine chip type with", "hinv") unless ($chip =~ /^R/);
-substr($chip, -3,3) = "000";
-$ip_type = `uname -m`;
-$os_vers = `uname -r`;
-if ($chip =~ /R5/) { $chip = "R4000_32"; }
-elsif ($chip =~ /R4/ && $os_vers =~ /6.2/ && $ip_type =~ /17|20|22/) {
- $chip = "R4000_32"; }
-
-# Find out if there is more than one processor (eg "2 150 MHZ IP19 Processors")
-$chipcount = `hinv -c processor`;
-$chipcount =~ s/ .*//;
-&ErrorMsg("Could not determine chip count with", "hinv") unless ($chipcount);
-
-# NFS support
-if ($Configuration{"NFSEXTENSIONS"}) {
- $nfs = ""; }
-else {
- $nfs = ".nonfs"; };
-
-# From the above, put together the name of the kernel library to use
-$libafs = "libafs.SP.$chip$nfs.a" if ($chipcount == 1);
-$libafs = "libafs.MP.$chip$nfs.a" if ($chipcount > 1);
-
-&CreateDir("/usr/vice/etc/sgiload");
-&ErrorsAreFatal(0);
-
-if (-f "root.client/bin/afs") {
- &Copy("root.client/bin/afs", "/usr/vice/etc/sgiload");
- &Copy("root.client/bin/afs.sm", "/usr/vice/etc/sgiload"); }
-elsif ( -f "root.client/usr/vice/etc/sgiload/afs") {
- &Copy("root.client/usr/vice/etc/sgiload/afs", "/usr/vice/etc/sgiload");
- &Copy("root.client/usr/vice/etc/sgiload/afs.sm", "/usr/vice/etc/sgiload"); };
-&Symlink("/usr/vice/etc/sgiload/afs", "/var/sysgen/master.d/afs");
-&Symlink("/usr/vice/etc/sgiload/afs.sm", "/var/sysgen/system/afs.sm");
-
-&Copy("root.client/bin/$libafs", "/var/sysgen/boot/afs.a");
-&Copy("root.client/usr/vice/etc/afsd", "/usr/vice/etc");
-&Chmod(0744, "/usr/vice/etc/afsd");
-&Copy("bin/fs", "/usr/vice/etc/fs");
-system("/etc/chkconfig -f afsml off");
-system("/etc/chkconfig -f afsclient on");
-}
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# An InstallGuide for dynamic kernel loaded libraries
-# For SGI systems running IRIX 6.x
-#
-
-sub modkernel {
-my($chip, $ip_type, $os_vers, $chipcount, $nfs, $libafs);
-&ErrorsAreFatal(1);
-
-# Find out what kind of chip the machine has (Rx000)
-$chip = `hinv -t cpu`;
-$chip =~ /R[4581][046]0*/;
-$chip = $&;
-&ErrorMsg("Could not determine chip type with", "hinv") unless ($chip =~ /^R/);
-substr($chip, -3,3) = "000";
-$ip_type = `uname -m`;
-$os_vers = `uname -r`;
-if ($chip =~ /R5/) { $chip = "R4000_32"; }
-elsif ($chip =~ /R4/ && $os_vers =~ /6.2/ && $ip_type =~ /17|20|22/) {
- $chip = "R4000_32"; }
-
-# Find out if there is more than one processor (eg "2 150 MHZ IP19 Processors")
-$chipcount = `hinv -c processor`;
-$chipcount =~ s/ .*//;
-&ErrorMsg("Could not determine chip count with", "hinv") unless ($chipcount);
-
-# NFS support
-if ($Configuration{"NFSEXTENSIONS"}) {
- $nfs = ""; }
-else {
- $nfs = ".nonfs"; };
-
-# From the above, put together the name of the kernel library to use
-$libafs = "libafs.SP.$chip$nfs.o" if ($chipcount == 1);
-$libafs = "libafs.MP.$chip$nfs.o" if ($chipcount > 1);
-
-&CreateDir("/usr/vice/etc/sgiload");
-&ErrorsAreFatal(0);
-
-&Copy("root.client/usr/vice/etc/sgiload/$libafs", "/usr/vice/etc/sgiload");
-&Copy("root.client/usr/vice/etc/afsd", "/usr/vice/etc");
-&Chmod(0744, "/usr/vice/etc/afsd");
-system("/etc/chkconfig -f afsml on");
-system("/etc/chkconfig -f afsclient on");
-&Copy("bin/fs", "/usr/vice/etc/fs");
-}
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# An InstallGuide for compiling a new kernel
-# For SGI systems running IRIX
-#
-
-sub build {
-&Print("Compiling with command \"autoconfig\"");
-&Print("in directory /var/sysgen/boot");
-&Print("New kernel will be /unix.install. System will automatically move");
-&Print("it to /unix upon reboot");
-
-&ErrorsAreFatal(1);
-$rc = chdir("/var/sysgen/boot");
-&ErrorMsg("Could not change to dir", "/var/sysgen/boot") if (!$rc);
-
-$rc = system("autoconfig");
-$rc = $rc >> 8;
-&Print("Returned code $rc");
-}
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# An InstallGuide for database server processes
-# For SGI systems running IRIX
-#
-
-sub IRIXdbserver {
-&ReadInstallGuide("$InstallGuideDir/GENERIC/dbserver");
-&dbserver;
-
-system("/etc/chkconfig -f afsserver on");
-}
-
-
-
-sub dbserver {
-goto &IRIXdbserver;
-}
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# An InstallGuide for fileserver processes
-# For SGI systems running IRIX
-#
-
-
-sub IRIXfileserver {
-&ReadInstallGuide("$InstallGuideDir/GENERIC/fileserver");
-&fileserver;
-system("/etc/chkconfig -f afsserver on");
-}
-
-
-
-sub fileserver {
-goto &IRIXfileserver;
-}
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# An InstallGuide for installing a new kernel
-# For SGI systems running IRIX. Note that Irix
-# will normally do this operation on reboot.
-#
-
-
-sub installkernel {
-&VersionCopyFile("/unix.install", "/unix");
-unlink("/unix.install");
-}
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# An InstallGuide for installing the AFS integrated login
-# For SGI systems running IRIX
-#
-
-sub login {
-&Copy ("root.client/usr/vice/etc/afsauthlib.so", "/usr/vice/etc");
-&Copy ("root.client/usr/vice/etc/afskauthlib.so", "/usr/vice/etc");
-}
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# An InstallGuide for fileserver processes
-# For SGI systems running IRIX
-#
-
-sub IRIXmiscserver {
-&ReadInstallGuide("$InstallGuideDir/GENERIC/miscserver");
-&miscserver;
-
-system("/etc/chkconfig -f afsserver on");
-}
-
-
-
-
-sub miscserver {
-goto &IRIXmiscserver;
-}
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# An InstallGuide for installing the initialization script
-# For SGI systems running IRIX
-#
-
-sub rc {
-&Copy("root.client/usr/vice/etc/sgiload/afs.rc", "/etc/init.d/afs");
-&Chmod (0555, "/etc/init.d/afs");
-&Symlink("../init.d/afs", "/etc/rc0.d/K35afs");
-&Symlink("../init.d/afs", "/etc/rc2.d/S35afs");
-}
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# An InstallGuide for the AFS modified Unix commands
-# For SGI systems running IRIX
-#
-
-sub IRIXunix {
- &Copy("etc/inetd", "/usr/etc/inetd.afs");
-
- &ErrorsAreFatal(1);
- &Patch::Verbose if ($InstallVerbose);
-
- # Create the inetd.conf.afs file
- $InetdConfAfs = "/etc/inetd.conf.afs";
- open(INETD, ">$InetdConfAfs") || &ErrorMsg("Can't open file", $InetdConfAfs);
- print INETD <<"EOINETD";
-ftp stream tcp nowait root /usr/etc/ftpd ftpd -l
-shell stream tcp nowait root /usr/etc/rshd rshd -L
-login stream tcp nowait root /usr/etc/rlogind rlogind
-ta-rauth stream tcp nowait root internal ta-rauth
-EOINETD
-
- # comment out the lines in inetd.conf
- $InetdConf = "/etc/inetd.conf";
- &CopyStat($InetdConf, $InetdConfAfs);
- &Patch::FileOpen($InetdConf);
-
- $Search1 = "^(ftp\\s+.+)";
- $Replace1 = '"#".$1';
-
- $Search2 = "^(shell\\s+.+)";
- $Replace2 = '"#".$1';
-
- $Search3 = "^(login\\s+.+)";
- $Replace3 = '"#".$1';
-
- if (!&Patch::Patch($InetdConf, [[1, "Substitution", $Search1, $Replace1],
- [1, "Substitution", $Search2, $Replace2],
- [1, "Substitution", $Search3, $Replace3]])) {
- &ErrorMsg("Did not succeed with patch", $InetdConf);
- }
-
- # Modify the /etc/services file
- &ReadInstallGuide("$InstallGuideDir/GENERIC/unix");
- &unix;
-}
-
-sub unix {
- goto &IRIXunix;
-}
-
-
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# An InstallGuide for dynamic kernel loaded libraries
-# For Sun systems running Solaris 5.x
-#
-
-sub modkernel {
-&ErrorsAreFatal(1);
-&CreateDir("/usr/vice/etc/modload");
-&ErrorsAreFatal(0);
-
-if ($Configuration{"NFSEXTENSIONS"}) {
- &Copy("root.client/usr/vice/etc/modload/libafs.o","/kernel/fs/afs"); }
-else {
- &Copy("root.client/usr/vice/etc/modload/libafs.nonfs.o",
- "/kernel/fs/afs"); }
-
-&Copy("root.client/usr/vice/etc/modload/afs.rc", "/usr/vice/etc/modload");
-&Copy("root.client/usr/vice/etc/afsd", "/usr/vice/etc");
-&Chmod(0744, "/usr/vice/etc/afsd");
-
-&Copy("bin/fs", "/usr/vice/etc/fs");
-# add the afs line to /etc/name_to_sysnum
-&ErrorsAreFatal(1);
-$File="/etc/name_to_sysnum";
-
-&Patch::Verbose if ($InstallVerbose);
-&Patch::FileOpen($File);
-
-$SearchString = <<"xxENDxx";
-fstatvfs 104
-nfs 106
-xxENDxx
-
-$NewString = <<"xxENDxx";
-fstatvfs 104
-afs 105
-nfs 106
-xxENDxx
-
-if (!&Patch::Patch($File, [[0, "Replace", $SearchString, $NewString]])) {
- &ErrorMsg ("Did not succeed with patch", $File);
-}
-
-}
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# An InstallGuide for installing the initialization script
-# For Sun systems running Solaris 5.x
-#
-
-sub rc {
-&Copy("root.client/usr/vice/etc/modload/afs.rc", "/etc/init.d/afs");
-&Chmod (0555, "/etc/init.d/afs");
-&Symlink("../init.d/afs", "/etc/rc3.d/S14afs");
-&Symlink("../init.d/afs", "/etc/rc2.d/K66afs");
-}
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# An InstallGuide for the AFS modified Unix commands
-# For Sun systems running Solaris 5.x
-#
-
-sub unix {
- &Copy("etc/inetd", "/usr/sbin/inetd.afs");
- &Copy("etc/ftpd", "/usr/sbin/in.ftpd.afs");
-
- &ErrorsAreFatal(1);
- &Patch::Verbose if ($InstallVerbose);
- &CreateDir("/usr/vice/bin");
-
- &Copy("bin/rcp", "/usr/vice/bin");
- &Chown (0,2, "/usr/vice/bin/rcp");
- &Chmod (04755, "/usr/vice/bin/rcp");
-
- &Copy("bin/rsh", "/usr/vice/bin");
- &Chown (0,2, "/usr/vice/bin/rsh");
- &Chmod (04755, "/usr/vice/bin/rsh");
-
- # Create the inetd.conf.afs file
- $InetdConfAfs = "/etc/inet/inetd.conf.afs";
- open(INETD, ">$InetdConfAfs") || &ErrorMsg("Can't open file", $InetdConfAfs);
- print INETD <<"EOINETD";
-ftp stream tcp nowait root /usr/sbin/in.ftpd.afs in.ftpd.afs
-shell stream tcp nowait root /usr/sbin/in.rshd in.rshd
-ta-rauth stream tcp nowait root internal ta-rauth
-EOINETD
- &Symlink("./inet/inetd.conf.afs", "/etc/inetd.conf.afs");
-
- # comment out the lines in inetd.conf
- $InetdConf = "/etc/inet/inetd.conf";
- &CopyStat($InetdConf, $InetdConfAfs);
- &Patch::FileOpen($InetdConf);
-
- $Search1 = "^(ftp\\s+.+)";
- $Replace1 = '"#".$1';
-
- $Search2 = "^(shell\\s+.+)";
- $Replace2 = '"#".$1';
-
- if (!&Patch::Patch($InetdConf, [[1, "Substitution", $Search1, $Replace1],
- [1, "Substitution", $Search2, $Replace2]])) {
- &ErrorMsg("Did not succeed with patch", $InetdConf);
- }
-
- # Modify the /etc/inet/services file
- # append the ta-rauth to the services file
- $Services = "/etc/inet/services";
- &Patch::FileOpen($Services);
- $ServicesAppend = "ta-rauth 601/tcp rauth";
-
- if (!&Patch::Patch($Services, [[0, "EOF", "", $ServicesAppend]])) {
- &ErrorMsg("Did not succeed with patch", $Services);
- }
-}
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# An InstallGuide for installing the AFS aware file system checker
-# For Sun systems running Solaris 5.x
-#
-
-sub vfsck {
-&Copy ("root.server/etc/vfsck", "/usr/lib/fs/ufs");
-&Symlink ("vfsck", "/usr/lib/fs/ufs/fsck");
-}
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# An InstallGuide for static kernel built libraries
-# For Alpha systems running Digital Unix 4.0
-#
-
-sub bldkernel {
-my($host);
-
-if ($Configuration{"NFSEXTENSIONS"}) {
- &Copy("root.client/bin/libafs.o", "/usr/sys/BINARY/afs.mod"); }
-else {
- &Copy("root.client/bin/libafs.nonfs.o", "/usr/sys/BINARY/afs.mod"); };
-
-&CreateDir("/usr/vice/etc");
-&Copy("root.client/usr/vice/etc/afsd", "/usr/vice/etc");
-&Chmod(0744, "/usr/vice/etc/afsd");
-&Copy("bin/fs", "/usr/vice/etc/fs");
-
-&ErrorsAreFatal(1);
-# Patch the files
-if (!-f "/usr/sys/conf/AFS") {
- $host = $ENV{HOST};
- $host =~ tr/a-z/A-Z/;
- &Copy("/usr/sys/conf/$host", "/usr/sys/conf/AFS"); };
-
-$AFS="/sys/conf/AFS";
-$FILES="/sys/conf/files";
-$VFSCONF="/sys/vfs/vfs_conf.c";
-
-&Patch::Verbose if ($InstallVerbose);
-
-&Patch::FileOpen($AFS);
-&Patch::FileOpen($FILES);
-&Patch::FileOpen($VFSCONF);
-
-$AFSSearchInsert = <<"xxENDxx";
-options UFS
-options NFS
-xxENDxx
-$AFSNewInsert = <<"xxENDxx";
-options AFS
-xxENDxx
-$AFSSearchReplace = "ident\\s+.+";
-$AFSNewReplace = "ident\t\t\"AFS\"";
-
-if (!&Patch::Patch($AFS, [[0, "Insert", $AFSSearchInsert, $AFSNewInsert],
- [1, "Replace", $AFSSearchReplace, $AFSNewReplace]])) {
- &ErrorMsg("Did not succeed with patch", $AFS);
-}
-
-$FILESSearch1 = << "xxENDxx";
-OPTIONS/nfs optional nfs
-xxENDxx
-$FILESNew1 = << "xxENDxx";
-OPTIONS/afs optional afs
-xxENDxx
-
-$FILESSearch2 = << "xxENDxx";
-nfs/nfs3_server.c module nfs_server optimize -g3
-#
-xxENDxx
-$FILESNew2 = << "xxENDxx";
-MODULE/afs optional afs Binary
-afs/libafs.c module afs
-#
-xxENDxx
-
-if (!&Patch::Patch($FILES, [[0, "Insert", $FILESSearch1, $FILESNew1],
- [0, "Insert", $FILESSearch2, $FILESNew2]])) {
- &ErrorMsg("Did not succeed with patch", $FILES);
-}
-
-$VFSSearch1 = "#include <cdfs.h>";
-$VFSNew1 = << "xxENDxx";
-#include <afs.h>
-#if defined(AFS) && AFS
-extern struct vfsops afs_vfsops;
-#endif
-
-#include <cdfs.h>
-xxENDxx
-
-$VFSSearch2 = << "xxENDxx";
- (struct vfsops *)0, "", /* 13 = MOUNT_ADDON */
-xxENDxx
-
-$VFSNew2 = << "xxENDxx";
-#if defined(AFS)
- &afs_vfsops, "afs",
-#else
- (struct vfsops *)0, "", /* 13 = MOUNT_ADDON */
-#endif
-xxENDxx
-
-
-
-if (!&Patch::Patch($VFSCONF, [[0, "Replace", $VFSSearch1, $VFSNew1],
- [0, "Replace", $VFSSearch2, $VFSNew2]])) {
- &ErrorMsg("Did not succeed with patch", $VFSCONF);
-}
-}
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# An InstallGuide for installing integrated login
-# For Alpha systems running Digital Unix 4.x and SIA
-#
-
-sub login {
-&Copy("lib/afs/libafssiad.so", "/usr/shlib/libafssiad.so");
-}
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# An InstallGuide for the AFS modified Unix commands
-# For Alpha systems running Digital Unix 4.x and SIA
-#
-
-sub DUXunix {
- &Copy("etc/inetd", "/usr/sbin/inetd.afs");
- &Copy("etc/inetd.conf", "/etc/inetd.conf.afs");
- &CopyStat("/etc/inetd.conf", "/etc/inetd.conf.afs");
-
- &ErrorsAreFatal(1);
- &CreateDir("/usr/vice/bin");
-
- &Copy("bin/rcp", "/usr/vice/bin");
- &Chown (0,2, "/usr/vice/bin/rcp");
- &Chmod (04755, "/usr/vice/bin/rcp");
-
- &Copy("bin/rsh", "/usr/vice/bin");
- &Chown (0,2, "/usr/vice/bin/rsh");
- &Chmod (04755, "/usr/vice/bin/rsh");
-
- # comment out the rshd line in inetd.conf
- $InetdConf = "/etc/inetd.conf";
- &Patch::Verbose if ($InstallVerbose);
- &Patch::FileOpen($InetdConf);
-
- $Search = "^(shell\\s+.+)";
- $Replace = '"#".$1';
-
- if (!&Patch::Patch($InetdConf, [[1, "Substitution", $Search, $Replace]])) {
- &ErrorMsg("Did not succeed with patch", $InetdConf);
- }
-
- # Modify the /etc/services file
- &ReadInstallGuide("$InstallGuideDir/GENERIC/unix");
- &unix;
-}
-
-sub unix {
- goto &DUXunix;
-}
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# An InstallGuide for compiling a new kernel
-# For HP 9000 systems running HPUX 10.01
-#
-
-sub build {
-my ($hostname);
-$hostname = `/bin/uname -n`;
-chop $hostname;
-$hostname = tr/a-z/A-Z/;
-&Print("Compiling with command \"/usr/sbin/config system\"");
-&Print("in directory /stand");
-&Print("New kernel will be /stand/vmunix_test");
-&Print("Install kernel as /stand/vmunix");
-
-&ErrorsAreFatal(1);
-$rc = chdir("/stand");
-&ErrorMsg("Could not change to dir", "/stand") if (!$rc);
-
-$rc = system("/usr/sbin/config system");
-$rc = $rc >> 8;
-&Print("Returned code $rc");
-}
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# An InstallGuide for installing a new kernel
-# For HP 9000/7xx systems running HPUX 10.0
-#
-
-
-sub installkernel {
-&VersionCopyFile("/stand/vmunix_test", "/stand/vmunix");
-}
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# An InstallGuide for compiling a new kernel
-# For HP 9000 systems running HPUX 10.10
-#
-
-sub build {
-my ($hostname);
-$hostname = `/bin/uname -n`;
-chop $hostname;
-$hostname =~ tr/a-z/A-Z/;
-&Print("Compiling with command \"/usr/sbin/config -m master.d $hostname\"");
-&Print("in directory /stand/build_afs");
-&Print("New kernel will be /stand/build_afs/vmunix_test");
-&Print("Install kernel as /stand/vmunix");
-
-&ErrorsAreFatal(1);
-$rc = chdir("/stand/build_afs");
-&ErrorMsg("Could not change to dir", "/stand/build_afs") if (!$rc);
-
-$rc = system("/usr/sbin/config -m master.d $hostname");
-$rc = $rc >> 8;
-&Print("Returned code $rc");
-}
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# An InstallGuide for installing a new kernel
-# For HP 9000/7xx systems running HPUX 10.10
-#
-
-
-sub installkernel {
-&VersionCopyFile("/stand/build_afs/vmunix_test", "/stand/vmunix");
-}
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# An InstallGuide for installing static AFS kernel libraries
-# For HP 9000 systems running HPUX 9.x
-#
-
-sub bldkernel {
-if ($Configuration{"NFSEXTENSIONS"}) {
- &Copy ("root.client/bin/libafs.a", "/etc/conf"); }
-else {
- &Copy ("root.client/bin/libafs.nonfs.a", "/etc/conf/libafs.a"); };
-
-&CreateDir("/usr/vice/etc");
-&Copy("root.client/usr/vice/etc/afsd", "/usr/vice/etc");
-&Chmod(0744, "/usr/vice/etc/afsd");
-&Copy("bin/fs", "/usr/vice/etc/fs");
-}
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# An InstallGuide for compiling a new kernel
-# For HP 9000/7xx systems running HPUX 9.x
-#
-
-sub build {
-&Print("Compiling with command \"make -f config.mk\"");
-&Print("in directory /etc/conf");
-&Print("New kernel will be /etc/conf/hp-ux");
-&Print("and should be installed as /hp-ux");
-
-&ErrorsAreFatal(1);
-$rc = chdir("/etc/conf");
-&ErrorMsg("Could not change to dir", "/etc/conf") if (!$rc);
-
-$rc = system("make -f config.mk");
-$rc = $rc >> 8;
-&Print("Returned code $rc");
-}
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# An InstallGuide for installing a new kernel
-# For HP 9000/7xx systems running HPUX 9.x
-#
-
-
-sub installkernel {
-&VersionCopyFile("/etc/conf/hp-ux", "/hp-ux");
-}
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# An InstallGuide for compiling a new kernel
-# For HP 9000 systems running HPUX 10.01
-#
-
-sub build {
-my ($hostname);
-$hostname = `/bin/uname -n`;
-chop $hostname;
-$hostname = tr/a-z/A-Z/;
-&Print("Compiling with command \"/usr/sbin/config systems\"");
-&Print("in directory /stnad");
-&Print("New kernel will be /stand/vmunix_test");
-&Print("Install kernel as /stand/vmunix");
-
-&ErrorsAreFatal(1);
-$rc = chdir("/stand");
-&ErrorMsg("Could not change to dir", "/stand") if (!$rc);
-
-$rc = system("/usr/sbin/config system");
-$rc = $rc >> 8;
-&Print("Returned code $rc");
-}
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# An InstallGuide for installing a new kernel
-# For HP 9000/8xx systems running HPUX 10.0
-#
-
-
-sub installkernel {
-&VersionCopyFile("/stand/vmunix_test", "/stand/vmunix");
-}
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# An InstallGuide for compiling a new kernel
-# For HP 9000 systems running HPUX 10.10
-#
-
-sub build {
-my ($hostname);
-$hostname = `/bin/uname -n`;
-chop $hostname;
-$hostname =~ tr/a-z/A-Z/;
-&Print("Compiling with command \"/usr/sbin/config -m master.d $hostname\"");
-&Print("in directory /stand/build_afs");
-&Print("New kernel will be /stand/build_afs/vmunix_test");
-&Print("Install kernel as /stand/vmunix");
-
-&ErrorsAreFatal(1);
-$rc = chdir("/stand/build_afs");
-&ErrorMsg("Could not change to dir", "/stand/build_afs") if (!$rc);
-
-$rc = system("/usr/sbin/config -m master.d $hostname");
-$rc = $rc >> 8;
-&Print("Returned code $rc");
-}
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# An InstallGuide for installing a new kernel
-# For HP 9000/8xx systems running HPUX 10.10
-#
-
-
-sub installkernel {
-&VersionCopyFile("/stand/build_afs/vmunix_test", "/stand/vmunix");
-}
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# An InstallGuide for installing static AFS kernel libraries
-# For HP 9000 systems running HPUX 9.x
-#
-
-sub bldkernel {
-if ($Configuration{"NFSEXTENSIONS"}) {
- &Copy ("root.client/bin/libafs.a", "/etc/conf/lib"); }
-else {
- &Copy ("root.client/bin/libafs.nonfs.a", "/etc/conf/lib/libafs.a"); };
-
-&CreateDir("/usr/vice/etc");
-&Copy("root.client/usr/vice/etc/afsd", "/usr/vice/etc");
-&Chmod(0744, "/usr/vice/etc/afsd");
-&Copy("bin/fs", "/usr/vice/etc/fs");
-}
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# An InstallGuide for compiling a new kernel
-# For HP 9000 systems running HPUX 9.x
-#
-
-sub build {
-&Print("Compiling with command \"/etc/uxgen SAFS\"");
-&Print("in directory /etc/conf/gen");
-&Print("New kernel will be /etc/conf/SAFS/hp-ux");
-&Print("and should be installed as /hp-ux");
-
-&ErrorsAreFatal(1);
-$rc = chdir("/etc/conf/gen");
-&ErrorMsg("Could not change to dir", "/etc/conf/gen") if (!$rc);
-
-$rc = system("/etc/uxgen SAFS");
-$rc = $rc >> 8;
-&Print("Returned code $rc");
-}
-
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# An InstallGuide for installing a new kernel
-# For HP 9000/8xx systems running HPUX 9.x
-#
-
-
-sub installkernel {
-&VersionCopyFile("/etc/conf/SAFS/hp-ux", "/hp-ux");
-}
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# An InstallGuide for installing static AFS kernel libraries
-# For HP systems running HPUX 10.20
-#
-
-sub bldkernel {
-if ($Configuration{"NFSEXTENSIONS"}) {
- &Copy("root.client/bin/libafs.a", "/usr/conf/lib"); }
-else {
- &Copy("root.client/bin/libafs.nonfs.a", "/usr/conf/lib/libafs.a"); };
-
-&CreateDir("/usr/vice/etc");
-&Copy("root.client/usr/vice/etc/afsd", "/usr/vice/etc");
-&Chmod(0744, "/usr/vice/etc/afsd");
-&Copy("root.client/usr/vice/etc/afs.driver", "/usr/conf/master.d/afs");
-&Copy("bin/fs", "/usr/vice/etc/fs");
-
-
-# Patch the files
-&ErrorsAreFatal(1);
-$FILE="/stand/system";
-
-&Patch::Verbose if ($InstallVerbose);
-
-&Patch::FileOpen($FILE);
-
-$Search = <<"xxENDxx";
-nfs
-xxENDxx
-
-$Add = <<"xxENDxx";
-afs
-xxENDxx
-
-if (!&Patch::Patch($FILE, [[0, "Insert", $Search, $Add]])) {
- &ErrorMsg("Did not succeed with patch", $FILE);
-}
-}
-
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# An InstallGuide for compiling a new kernel
-# For HP 9000 systems running HPUX 10.20
-#
-
-sub build {
-print "Compiling with command \"/usr/sbin/mk_kernel\"\n";
-print "in directory /stand/build\n";
-print "New kernel will be /stand/build/vmunix_test\n";
-print "Install kernel as /stand/vmunix\n";
-
-&ErrorsAreFatal(1);
-$rc = chdir("/stand/build");
-&ErrorMsg("Could not change to dir", "/stand/build") if (!$rc);
-
-$rc = system("/usr/sbin/mk_kernel");
-$rc = $rc >> 8;
-print "Returned code $rc\n";
-}
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# An InstallGuide for installing a new kernel
-# For HP 9000 systems running HPUX 10.20
-#
-
-
-sub installkernel {
-&VersionCopyFile("/stand/build/vmunix_test", "/stand/vmunix");
-}
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# bldkernel
-#
-# An InstallGuide for installing static kernel libs
-#
-
-sub bldkernel {
-&Print("Installs the libraries necessary for building AFS into the");
-&Print("kernel, putting them in the system specific directories.");
-&Print("Also installs the AFS daemon /usr/vice/etc/afsd and the client");
-&Print("control and query program /usr/vice/etc/fs");
-&Print("If the NFS Support Option is turned on, the libraries which");
-&Print("support NFS and the NFS Translator are installed instead.");
-&Print("See also the Perform Kernel Build package.");
-}
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# build
-#
-# An InstallGuide for building a kernel with AFS
-#
-
-sub build {
-&Print("This option will execute the commands which build a new kernel");
-&Print("on the system. It will modify the system files necessary to");
-&Print("incorporate AFS into the new kernel. For details on what system");
-&Print("files must be modified, see the AFS Install Guide and current");
-&Print("Release Notes. This option will tell where the new kernel is and");
-&Print("where to install it, but will NOT remove the existing kernel file.");
-&Print("See the \"installkernel\" option for automatically installing");
-&Print("the new kernel into place.");
-}
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# clientconfig
-#
-# An InstallGuide for configuration of an AFS client
-#
-
-sub clientconfig {
-&Print("Initializes a machine for the first time to be an AFS client.");
-&Print("Creates the /usr/vice/etc directory and places therein a cacheinfo");
-&Print("file, ThisCell file, and CellServDB. These files are controlled by");
-&Print("the configuration parameters AFSROOT, CACHEDIR, CACHESIZE, CELLNAME,");
-&Print("and CELLSERVDB.");
-}
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# dbserver
-#
-# An InstallGuide for database server processes
-#
-
-sub dbserver {
-&Print("Installs the following into /usr/afs/bin:");
-&Print(" root.server/usr/afs/bin/bosserver");
-&Print(" root.server/usr/afs/bin/kaserver");
-&Print(" root.server/usr/afs/bin/vlserver");
-&Print(" root.server/usr/afs/bin/ptserver");
-}
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# debug
-#
-# An InstallGuide for installing debugging programs
-#
-
-sub debug {
-&Print("Installs the following into /usr/vice/bin:");
-&Print(" bin/afsmonitor");
-&Print(" bin/cmdebug");
-&Print(" etc/fstrace");
-&Print(" etc/kdump");
-&Print(" etc/rxdebug");
-&Print(" bin/scout");
-&Print(" bin/udebug");
-&Print("Install root.server/usr/afs/bin/volinfo into /usr/afs/bin");
-&Print("Install root.client/usr/vice/etc/C/afszcm.cat into /usr/vice/etc/C");
-}
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# fileserver
-#
-# An InstallGuide for fileserver processes
-#
-
-sub fileserver {
-&Print("Installs the following into /usr/afs/bin:");
-&Print(" root.server/usr/afs/bin/bosserver");
-&Print(" root.server/usr/afs/bin/fileserver");
-&Print(" root.server/usr/afs/bin/volserver");
-&Print(" root.server/usr/afs/bin/salvager");
-}
+++ /dev/null
-
-Help on the GUI Installer
-==========================
-
-
-Table of Contents
-------------------
-Introduction
-Install Guides
- Sysname directories
- Wildcard directories
- .skip files
-The RC File
-The Main Window
- Hostname
- Local installs
- Remote installs
- Multiple installations
- Path
- Finding the AFS distribution
- Finding the AFS sysname
- Accelerator buttons
- Setting default path from command line
- Packages
- Default vs Custom installation
- List of available packages and where it comes from
- Command line list of packages
- Adding new packages to the list
- Options
- Verbose
- Backup files
- Setting default values from command line
-Installation
- Info Only
- Install
- The Progress window
- Default installations
- Seeing the command output
- Finishing up the installation
- Why those two buttons are disabled
-Exit
-Errors
-
-
-
-INTRODUCTION
-------------
-This program is designed to install AFS on a machine from a
-standard AFS distribution directory. The AFS distribution is
-logically divided into sections called "packages", and one or more
-packages can be installed at a time. AFS can be installed on the
-local machine or to one or more remote machines on which AFS aware
-inetd is running.
-
-INSTALL GUIDES
---------------
- The installation of packages is controlled by perl subscripts
-called Install Guides. The complete set of Install Guides is kept
-under the lib/InstallGuides directory. There is one Install Guide
-per package, and it provides all of the Perl code that is necessary
-to install that package. Because different systems have different
-requirements for installation, the InstallGuides/ directory has in
-it different subdirectories for different systems. The
-subdirectories match the AFS sysnames, such as "sgi_64". Inside
-each system name subdirectory are package files that are specific
-to the system.
- There are also wildcard subdirectories, such as SGI_x, which can
-be searched if a desired package is NOT in its sysname
-subdirectory. The wildcarding consists of capitalizing the letters
-in the sysname, and using the letter "x" to match one or more
-characters. In the case of multiple wildcard directories matching a
-sysname, the longest wildcard directory wins.
- As a catchall wildcard, there is also a subdirectory "GENERIC"
-that can be searched if all other matches fail.
- If a file exists whose name is a package name with ".skip"
-appended, that package will not be installed on machines of that
-system type. This is useful to prevent GENERIC Installation Guides
-from being used, such as "bldkernel" on Solaris machines or "vfsck"
-on SGI machines.
-
-RC FILE
---------
- This installer program uses an rc script named "afsinstall.rc"
-located in the InstallGuides/ subdirectories. Locating the right one
-follows the same rules as locating an InstallGuide: look in the
-sysname subdirectory, then look in the wildcard directories, and
-lastly look in GENERIC.
- The GENERIC afsinstall.rc file is always read in, followed by the
-most system specific one available, if any. There can also be an
-afsinstall.rc file in the user's home directory given by the
-environment variable "HOME", and if it exists it will be read in
-last. If more than one of these afsinstall.rc files are read in, the
-files read later will merge with and overwrite the values and options
-from the earlier files.
- The rc file consists of three sections separated by a blank
-line. The first section sets up Path accelerator buttons, the second
-describes available packages. Both are described in the appropriate
-sections below. The third section sets configuration options similar
-to environment variables. Each line is of the form
-
-NAME=VALUE
-
-The InstallGuide files can then access the VALUE by referencing the
-key NAME in the hash Configuration. This is intended for use as
-options such as use of NFS aware kernel libraries, default cache size,
-etc. The VALUE can be omitted after the equals sign to signify a NULL
-value.
-
- The personal afsinstall.rc file in the user's home directory is
-intended to let the user select default packages to install and
-default options such as usage of NFS libraries. Because the user may
-want to set different options for different system types, system
-specific options can be put into an afsinstall.rc file. To make a
-given line in the file apply only to certain system types, the line
-can be prepended with an AFS system name followed by a colon, such as:
-
-sun4x_56 :modkernel 1 Dynamic kernel libraries and afsd
- ALPHA_x :modkernel 0 Dynamic kernel libraries and afsd
-
-The first line shows that Solaris 2.6 systems should have the
-"modkernel" package installed by default, while the wildcarded second
-line shows the same option should be off by default on all Alpha
-platforms. All systems that were not running Solaris 2.6 would
-completely skip the first line, such that the determination of
-installing the "modkernel" package by default would have to be
-resolved by one of the other afsinstall.rc files that was read in.
-The same applies for the second line in the example above for non
-Alpha machines.
-
-
-THE MAIN WINDOW
-----------------
-The install window is divided into four sections. From top to
-bottom, these sections select the host or hosts on which to
-install, locate the AFS distribution, select the packages to
-install, and set certain options.
-
-
-HOSTNAME
---------
- The top section first appears as an entry box labelled "Hostname"
-with the local hostname filled in. The local hostname was taken
-from the HOST environment variable. If an install is begun by
-pressing the "INSTALL" button, AFS will be installed on the local
-machine using the same user identity by which this program was run.
- If a new value is typed in and entered with the RETURN key, a
-second entry box will appear labelled "rsh as username:", and a
-default username is filled in. This value came from the RSHas
-variable set at the top of this program. When an installation is
-started, the program will attempt to make an rsh connection to the
-hostname entered under the identity given in the "rsh as username:"
-box. Note that rsh will still be used if the hostname entered does
-not match the HOST environment variable but still refers to the
-local host (eg entering "localhost" or the FQDN). Also note that
-setting up an AFS aware inetd on the remote machine requires that
-the AFS client is already running, so this feature is primarily
-intended for AFS upgrades and not first time installs.
- If the value entered into the "Hostname" box is a filename, the
-label for that box becomes "Filename". If an install is then
-started by pressing the "INSTALL" button, the entered file is read
-and each line of the file is used as a remote hostname on which to
-install AFS using rsh.
-
-PATH
-----
- The Path section is divided into two parts. The upper part is an
-entry box and the lower half is several default value buttons. The
-path to the distribution of AFS is entered into the upper entry
-box. When an install is started by pressing the "INSTALL" button,
-the path given is inspected, searching for signs of an AFS
-distribution. Namely, the existence of a "root.client" directory is
-used to determine if there is an AFS distribution. If the path
-given does not have an AFS distribution, the installer will also
-look for one under a directory matching the host's AFS sysname (eg
-sun4x_55) and a directory under that named "dest". If no AFS
-distribution can be found, the installation exits with an error.
- The AFS sysname is determined automatically using the output of
-/bin/uname and NOT via "fs sysname". If an installation is being
-done on a remote machine, the remote machine's AFS sysname is used,
-allowing installations on heterogeneous networks.
- The buttons in the lower half of the Path section will enter in
-path names for you into the upper entry box. By clicking on any of
-the buttons, the entry box is cleared and a new value is
-inserted. A special button "CLEAR" is automatically provided which
-simply clears the entry box. The other buttons are taken from the
-top half of the installer rc script. The lines from that file
-consist of a key word to put into the button, followed by a pathname. If
-one of the accelerator buttons has the key word "default", the
-pathname given will be entered into the entry box when the program
-starts, and no button is rendered for it.
- If the "-path" flag was given on the command line, whatever
-string followed that flag will be filled in as the default install
-path.
-
-PACKAGES
---------
- The Packages area is also divided into two halves. The upper half
-consists of two radio buttons which allow you to install either a
-default set of packages or a hand selected set of packages. The
-lower half lists the packages that can be hand selected, and is
-only used if the "Custom installation:" radio button is selected.
- The list of packages available is read from the lower section of
-the afsinstall.rc file. Each line consists of three parts: the
-package name (and, therefore, matching InstallGuide filename), the
-default mode for that package, and a brief explanation of the
-package. If the "Default Installation" radio button is selected,
-all those packages with a "mode" of "1" will be installed. These
-default packages are also initially selected in the "custom"
-packages area when the program starts.
- Note that the list of default packages can change from system to
-sytem, depending on which afsinstall.rc file in the
-lib/InstallGuides/ directories matches the system name on which AFS
-is being installed. Thus the default packages on the local machine
-may be different from those on remote machines if the remote
-machines are of different system types.
- If the "-pkg" flag was given on the command line when the
-installer was invoked, the list of package names provided will be
-selected and the "Custom installation" radio button will select
-itself.
- See the "INFO ONLY" button (below) for details about what each
-package does.
- New packages can be added by creating Perl subscripts in the
-InstallGuides/ directories and appending an entry to the
-afsinstall.rc file. The Install Guide subscript file is given the
-same name as the package name. Within the file is a function also
-with the same name as the package. Whatever code is within that
-function will be loaded in and executed when that package is
-installed. Several "smart" functions are available in the body of
-the installer program itself, such as &Copy(), &Symlink(), and
-&CreateDir(). Following the code of other existing Install Guides
-will show how these functions can be used.
-
-
-OPTIONS
--------
- There are two option buttons. The first option, labelled "Verbose"
-turns on verbose output. When selected, the installations will provide
-more output about what they are doing. Without this option, only the
-package names and error messages are output during the install. The
-second option button, "Don't keep backup files", instructs the
-installer to not keep a backup of files being overwritten. When the
-option is off, a file that is about to be overwritten will be moved
-aside by appending .old to the filename.
- Both options are off by default. The "-v" flag can be given on the
-command line to turn on the Verbose option, and the "-nobackup" flag
-will disable backup file creation.
-
-
-
-INSTALLATION
-=============
-
-INFO ONLY
----------
- If this button is pressed, no installation of AFS will actually
-occur. Instead, a window appears and gives details about what each
-selected package does. The information is derived from the "info"
-subdirectory in the InstallGuides/ area. The window has a "DISMISS"
-button for when you are finished reading.
- This help guide is actually the info guide named "gui".
-
-INSTALL
---------
- This button begins the actual installation. When pressed, a new
-window will appear, called the Progress window. The window will
-contain a column of boxes for each machine on which an
-installation is running. Note that multiple installations is only
-available by entering a filename in the "Hostname:" box (see
-above). At the top of the column(s) will be a button labelled with
-the hostname on which the installation is running. Under the
-hostname(s) there will be a box for each package that has been
-selected. When the machine begins installation of a package, the
-box contains the word "WORKING". If an error occurs with the
-installation of that package, the box says "ERROR". Installation of
-later packages will still occur despite errors in previous
-packages. When a package completes without errors the box will
-say "SUCCESS". When the installation finishes, the last box in the
-column, labelled "done" will turn to either "SUCCESS" or "ERRORS"
-depending on the outcome of all the packages.
- Note that if the "Default installation" radio button in the
-Packages area is selected, a row of boxes will be created for ALL
-available packages. If an available package is not a default
-package for a particular machine, that box will never be filled in for
-that machine. This was done because the set of default packages can
-vary if multiple installations are in progress.
- To see the full text output of a machine's installation, press
-the hostname button at the top of the column of boxes. A window
-will appear with all of the output. A scrollbar is attached for
-when the output exceeds the height of the window. The window size
-can be changed by using the window manager. At the bottom of the
-output window will be two buttons, named "STOP INSTALL" and
-"DISMISS". The first will kill the install job on that machine,
-whether it is the local host or a remote host. this is for use when
-you see things going very wrong. The second button closes the
-output window but leaves the installation running. When the
-installation is complete the "STOP INSTALL" button is removed. If
-the output window is closed, it can be reopened again by pressing
-the hostname button again in the Progress window.
- The Progress window also has a "DISMISS" button, and if this button
-is pressed the Progress window will close itself. If there are
-installations still in progress they will be terminated, and all
-output from the installs is deleted from memory. Use this button
-only when you are satisfied with the completion of the
-installation.
- While the Progress window is still open the "INSTALL" and "INFO
-ONLY" buttons in the main window are disabled. This is a safety
-feature to prevent simultaneous installation processes on the same
-machine. Closing the Progress window will reenable the two buttons.
-
-
-EXIT
-====
- The EXIT button at the bottom closes all windows and exits the
-program.
-
-
-ERRORS
-======
- There are a few errors that are checked for and are handled in
-the installation process. Error windows will appear for a certain
-set of these errors.
- If an installation is to be performed on a
-remoted machine, and that machine does not have an AFS aware inetd
-running the rsh daemon, an error window will appear telling you
-so.
- The installation program is a Perl script that requires Perl
-5. The path to the perl program is the very first line of the
-install program. If that path is to a Version 4 copy of Perl, an
-error window will appear telling you so. This can be fixed either
-by changing the first line of the installer or by upgrading the
-copy of Perl to at least Version 5.00.
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# installkernel
-#
-# An InstallGuide for installing static kernels
-#
-
-sub installernel {
-&Print("Take a kernel that has been statically built and installs it");
-&Print("in place so that it will be used after the next reboot. This");
-&Print("is intended only for use on those machines that enable");
-&Print("building AFS into the kernel instead of dynamically loading.");
-&Print("A hard link is made between the new kernel and a copy of it");
-&Print("with the AFS revision appended to the filename. If the");
-&Print("previous kernel did NOT have AFS built into it, that vendor");
-&Print("kernel is moved aside with \".orig\" appended to the filename.");
-}
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# login
-#
-# An InstallGuide for installing the AFS integrated login
-#
-
-sub login {
-&Print("Installs /bin/login.afs and makes /bin/login a symlink to it.");
-&Print("This should be installed on all client machines so that logging");
-&Print("into a system at the usual Unix login prompt will authenticate");
-&Print("the user with AFS and store a token in the kernel.");
-&Print("Note that this option is different on certain systems, such as");
-&Print("AIX and SGI, where helper files are installed in /usr/vice/etc");
-&Print("and on systems which use authentication modules such as PAM and SIA");
-}
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# miscserver
-#
-# An InstallGuide for fileserver processes
-#
-
-sub miscserver {
-&Print("Installs the following into /usr/afs/bin:");
-&Print(" root.server/usr/afs/bin/buserver");
-&Print(" root.server/usr/afs/bin/upserver");
-&Print(" root.server/usr/afs/bin/upclient");
-}
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# modkernel
-#
-# An InstallGuide for installing dynamic kernel libs
-#
-
-sub modkernel {
-&Print("Installs the libraries necessary for dynamically loading AFS");
-&Print("into the kernel, usually putting them in /usr/vice/etc/dkload");
-&Print("Also installs the AFS daemon /usr/vice/etc/afsd and the client");
-&Print("control and query program /usr/vice/etc/fs");
-&Print("If the NFS Support Option is turned on, the libraries which");
-&Print("support NFS and the NFS Translator are installed instead.");
-}
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# other
-#
-# An InstallGuide for generic binaries not specifically listed in other
-# packages
-#
-
-sub other {
-&Print("Installs the following into /usr/afs/bin:");
-&Print(" bin/compile_et");
-&Print(" bin/kpwvalid");
-&Print(" bin/install");
-&Print(" bin/pagsh");
-&Print(" etc/rmtsysd");
-&Print(" bin/rxgen");
-&Print(" bin/sys");
-&Print(" bin/up");
-&Print(" bin/washtool");
-&Print(" bin/xstat_cm_test");
-&Print(" bin/xstat_fs_test");
-}
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# rc
-#
-# An InstallGuide for AFS startup scripts
-#
-
-sub rc {
-&Print("Installs the following into /usr/vice/etc/dkload:");
-&Print(" root.client/usr/vice/etc/dkload/rc.afsd.small");
-&Print(" root.client/usr/vice/etc/dkload/rc.afsd.medium");
-&Print(" root.client/usr/vice/etc/dkload/rc.afsd.large");
-&Print("Creates a script to be run with the system rc scripts.");
-&Print(" * For most BSD systems, it is stored as /etc/rc.afs");
-&Print(" * For most SYSV systems, it is stored as /etc/init.d/afs");
-&Print(" or /sbin/init.d/afs, and symlinks are made in /etc/rc?.d/");
-&Print(" or /sbin/rc?.d/ so that it runs in the right order.");
-&Print(" * On AIX systems, an entry is added to /etc/inittab so that AFS");
-&Print(" is started at runlevel 2 after NFS starts.");
-&Print(" * On HP-UX 9.x systems, a command is also added into the");
-&Print(" localrc() function in /etc/rc to run /etc/rc.afs");
-}
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# serveruser
-#
-# An InstallGuide for user programs for controlling server processes
-#
-
-sub serveruser {
-&Print("Installs the following into /usr/afs/bin:");
-&Print(" root.server/usr/afs/bin/bos");
-&Print(" root.server/usr/afs/bin/fs");
-&Print(" root.server/usr/afs/bin/kas");
-&Print(" root.server/usr/afs/bin/pts");
-&Print(" root.server/usr/afs/bin/vos");
-&Print(" etc/butc");
-&Print(" etc/backup");
-&Print(" root.server/usr/afs/bin/ntpdc");
-}
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# tokens
-#
-# An InstallGuide for installing tokens related commands
-#
-
-sub tokens {
-&Print("Installs the following into /usr/afs/bin/ :");
-&Print(" bin/klog");
-&Print(" bin/knfs");
-&Print(" bin/kpasswd");
-&Print(" bin/pagsh");
-&Print(" bin/tokens");
-&Print(" bin/unlog");
-}
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# unix
-#
-# An InstallGuide for installing the AFS aware unix programs
-#
-
-sub unix {
-&Print("Installs the modified Unix programs into the system specific");
-&Print("directories. The programs include:");
-&Print(" inetd.afs");
-&Print(" rsh");
-&Print(" rcp");
-&Print(" ftpd\n");
-}
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# vfsck
-#
-# An InstallGuide for installing the AFS integrated fsck
-#
-
-sub vfsck {
-&Print("Replaces the vendor fsck program with an identical program");
-&Print("which is aware of the changes to inodes made in vice");
-&Print("partitions on fileservers. This should be installed on all");
-&Print("AFS fileservers.");
-}
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# An InstallGuide for static AFS kernel libraries
-# For SGI systems running IRIX 6.3
-#
-
-sub bldkernel {
-my ($chip, $nfs, $libafs);
-&ErrorsAreFatal(1);
-
-# Find out what kind of chip the machine has (Rx000)
-$chip = `hinv -t cpu`;
-$chip =~ /R[51]0*/;
-$chip = $&;
-&ErrorMsg("Couldn't determine chip type with", "hinv") unless ($chip =~ /^R/);
-
-# NFS support
-if ($Configuration{"NFSEXTENSIONS"}) {
- $nfs = ""; }
-else {
- $nfs = ".nonfs"; };
-
-# From the above, put together the name of the kernel library to use
-$libafs = "libafs.SP.$chip$nfs.a";
-
-&CreateDir("/usr/vice/etc/sgiload");
-&ErrorsAreFatal(0);
-
-&Copy("root.client/bin/$libafs", "/var/sysgen/boot/afs.a");
-&Copy("root.client/usr/vice/etc/sgiload/afs", "/usr/vice/etc/sgiload");
-&Copy("root.client/usr/vice/etc/sgiload/afs.rc", "/usr/vice/etc/sgiload");
-&Copy("root.client/usr/vice/etc/sgiload/afs.sm", "/usr/vice/etc/sgiload");
-
-&Copy("root.client/usr/vice/etc/afsd", "/usr/vice/etc");
-&Chmod(0744, "/usr/vice/etc/afsd");
-&Copy("bin/fs", "/usr/vice/etc/fs");
-system("/etc/chkconfig -f afsml off");
-}
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# An InstallGuide for dynamic kernel loaded libraries
-# For SGI systems running IRIX 6.x
-#
-
-sub modkernel {
-my($chip, $nfs, $libafs);
-&ErrorsAreFatal(1);
-
-# Find out what kind of chip the machine has (Rx000)
-$chip = `hinv -t cpu`;
-$chip =~ /R[51]0*/;
-$chip = $&;
-&ErrorMsg("Could not determine chip type with", "hinv") unless ($chip =~ /^R/);
-
-# NFS support
-if ($Configuration{"NFSEXTENSIONS"}) {
- $nfs = ""; }
-else {
- $nfs = ".nonfs"; };
-
-# From the above, put together the name of the kernel library to use
-$libafs = "libafs.SP.$chip$nfs.o";
-
-&CreateDir("/usr/vice/etc/sgiload");
-&ErrorsAreFatal(0);
-
-&Copy("root.client/usr/vice/etc/sgiload/$libafs", "/usr/vice/etc/sgiload");
-&Copy("root.client/usr/vice/etc/sgiload/afs", "/usr/vice/etc/sgiload");
-&Copy("root.client/usr/vice/etc/sgiload/afs.rc", "/usr/vice/etc/sgiload");
-&Copy("root.client/usr/vice/etc/sgiload/afs.sm", "/usr/vice/etc/sgiload");
-
-&Copy("root.client/usr/vice/etc/afsd", "/usr/vice/etc");
-&Chmod(0744, "/usr/vice/etc/afsd");
-system("/etc/chkconfig -f afsml on");
-&Copy("bin/fs", "/usr/vice/etc/fs");
-}
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# An InstallGuide for static AFS kernel libraries
-# For SGI systems running IRIX 6.3
-#
-
-sub bldkernel {
-my ($nfs, $libafs);
-&ErrorsAreFatal(1);
-
-# NFS support
-if ($Configuration{"NFSEXTENSIONS"}) {
- $nfs = ""; }
-else {
- $nfs = ".nonfs"; };
-
-# From the above, put together the name of the kernel library to use
-$libafs = "libafs$nfs.a";
-
-&CreateDir("/usr/vice/etc/sgiload");
-&ErrorsAreFatal(0);
-
-&Copy("root.client/bin/$libafs", "/var/sysgen/boot/afs.a");
-&Copy("root.client/usr/vice/etc/sgiload/afs", "/usr/vice/etc/sgiload");
-&Copy("root.client/usr/vice/etc/sgiload/afs.rc", "/usr/vice/etc/sgiload");
-&Copy("root.client/usr/vice/etc/sgiload/afs.sm", "/usr/vice/etc/sgiload");
-
-&Copy("root.client/usr/vice/etc/afsd", "/usr/vice/etc");
-&Chmod(0744, "/usr/vice/etc/afsd");
-&Copy("bin/fs", "/usr/vice/etc/fs");
-system("/etc/chkconfig -f afsml off");
-}
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# An InstallGuide for dynamic kernel loaded libraries
-# For SGI systems running IRIX 6.x
-#
-
-sub modkernel {
-my($nfs, $libafs);
-&ErrorsAreFatal(1);
-
-# NFS support
-if ($Configuration{"NFSEXTENSIONS"}) {
- $nfs = ""; }
-else {
- $nfs = ".nonfs"; };
-
-# From the above, put together the name of the kernel library to use
-$libafs = "libafs$nfs.o";
-
-&CreateDir("/usr/vice/etc/sgiload");
-&ErrorsAreFatal(0);
-
-&Copy("root.client/usr/vice/etc/sgiload/$libafs", "/usr/vice/etc/sgiload");
-&Copy("root.client/usr/vice/etc/sgiload/afs", "/usr/vice/etc/sgiload");
-&Copy("root.client/usr/vice/etc/sgiload/afs.rc", "/usr/vice/etc/sgiload");
-&Copy("root.client/usr/vice/etc/sgiload/afs.sm", "/usr/vice/etc/sgiload");
-
-&Copy("root.client/usr/vice/etc/afsd", "/usr/vice/etc");
-&Chmod(0744, "/usr/vice/etc/afsd");
-system("/etc/chkconfig -f afsml on");
-&Copy("bin/fs", "/usr/vice/etc/fs");
-}
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# An InstallGuide for installing the AFS integrated login
-#
-
-sub login {
- &ErrorsAreFatal(1);
- &Copy("lib/pam_afs.so.1", "/usr/lib/security");
- &Chmod(0755, "/usr/lib/security/pam_afs.so.1");
- &Chown(0,3, "/usr/lib/security/pam_afs.so.1");
-
- $PamConf = "/etc/pam.conf";
- &Patch::Verbose if ($InstallVerbose);
- &Patch::FileOpen($PamConf);
-
- $LoginSubSearch = "^(login.+)required(.+)";
- $LoginSubReplace = '$1.optional.$2';
-
- $LoginAuthSearch = "^login\\s+auth\\s+.*pam_unix.so.1";
- $LoginAuthNew = <<"xxENDxx";
-login auth optional /usr/lib/security/pam_afs.so.1 try_first_pass ignore_root
-xxENDxx
-
- $LoginAccountSearch = "^login\\s+account\\s+.*pam_unix.so.1";
- $LoginAccountNew = <<"xxENDxx";
-login account optional /usr/lib/security/pam_afs.so.1 try_first_pass ignore_root
-xxENDxx
-
- $OtherSubSearch = "^(other.+)required(.+)";
- $OtherSubReplace = '$1.optional.$2';
-
- $OtherAuthSearch = "^other\\s+auth\\s+.*pam_unix.so.1";
- $OtherAuthNew = <<"xxENDxx";
-other auth optional /usr/lib/security/pam_afs.so.1 try_first_pass ignore_root
-xxENDxx
-
- $OtherAccountSearch = "^other\\s+account\\s+.*pam_unix.so.1";
- $OtherAccountNew = <<"xxENDxx";
-other account optional /usr/lib/security/pam_afs.so.1 try_first_pass ignore_root
-xxENDxx
-
- $DtLoginSubSearch = "^(dtlogin.+)required(.+)";
- $DtLoginSubReplace = '$1.optional.$2';
-
- $DtLoginAccountSearch = "^dtlogin\\s+account\\s+.*pam_unix.so.1";
- $DtLoginAccountNew = <<"xxENDxx";
-dtlogin account optional /usr/lib/security/pam_afs.so.1 try_first_pass ignore_root
-xxENDxx
-
- &VPrint("Patching \"$PamConf\"");
- if (!&Patch::Patch($PamConf, [[1, "Substitution", $LoginSubSearch, $LoginSubReplace],
- [1, "Insert", $LoginAuthSearch, $LoginAuthNew],
- [1, "Insert", $LoginAccountSearch, $LoginAccountNew],
- [1, "Substitution", $OtherSubSearch, $OtherSubReplace],
- [1, "Insert", $OtherAuthSearch, $OtherAuthNew],
- [1, "Insert", $OtherAccountSearch, $OtherAccountNew],
- [1, "Substitution", $DtLoginSubSearch, $DtLoginSubReplace],
- [1, "Insert", $DtLoginAccountSearch, $DtLoginAccountNew]])) {
- &ErrorMsg("Did not succeed with patch", $PamConf);
- }
- &Chmod(0644, $PamConf);
- &Chown(0,0, "/usr/lib/security/pam_afs.so.1");
-
-}
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# An InstallGuide for the AFS modified Unix commands
-# For Sun systems running Solaris 5.6
-#
-
-sub unix {
- &Copy("etc/inetd", "/usr/sbin/inetd.afs");
-
- &ErrorsAreFatal(1);
- &Patch::Verbose if ($InstallVerbose);
- &CreateDir("/usr/vice/bin");
-
- &Copy("bin/rsh", "/usr/vice/bin");
- &Chown (0,2, "/usr/vice/bin/rsh");
- &Chmod (04755, "/usr/vice/bin/rsh");
-
- &Copy("lib/pam_afs.so.1", "/usr/lib/security");
- &Chmod(0755, "/usr/lib/security/pam_afs.so.1");
- &Chown(0,3, "/usr/lib/security/pam_afs.so.1");
-
- $PamConf = "/etc/pam.conf";
- &Patch::FileOpen($PamConf);
-
- $RloginSubSearch = "^(rlogin.+)required(.+)";
- $RloginSubReplace = '$1.optional.$2';
-
- $RLoginAuthSearch = "^rlogin\\s+auth\\s+.+pam_unix.so.1";
- $RLoginAuthNew = <<"xxENDxx";
-rlogin auth optional /usr/lib/security/pam_afs.so.1 try_first_pass ignore_root
-xxENDxx
-
- $RshSubSearch = "^(rsh.+)required(.+)";
- $RshSubReplace = '$1.optional.$2';
-
- $RshSearch = "^rsh\\s+auth\\s+.*pam_rhosts_auth.so.1";
- $RshNew = <<"xxENDxx";
-rsh auth optional /usr/lib/security/pam_afs.so.1 try_first_pass ignore_root
-xxENDxx
-
- if (!&Patch::Patch($PamConf, [[1, "Substitution", $RloginSubSearch, $RloginSubReplace],
- [1, "Insert", $RLoginAuthSearch, $RLoginAuthNew],
- [1, "Substitution", $RshSubSearch, $RshSubReplace],
- [1, "Insert", $RshSearch, $RshNew]])) {
- &ErrorMsg("Did not succeed with patch", $PamConf);
- }
-
- # Create the inetd.conf.afs file
- $InetdConfAfs = "/etc/inet/inetd.conf.afs";
- open(INETD, ">$InetdConfAfs") || &ErrorMsg("Can't open file", $InetdConfAfs);
- print INETD <<"EOINETD";
-shell stream tcp nowait root /usr/sbin/in.rshd in.rshd
-ta-rauth stream tcp nowait root internal ta-rauth
-EOINETD
- &Symlink("./inet/inetd.conf.afs", "/etc/inetd.conf.afs");
-
- # comment out the rshd line in inetd.conf
- $InetdConf = "/etc/inet/inetd.conf";
- &CopyStat($InetdConf, $InetdConfAfs);
- &Patch::FileOpen($InetdConf);
-
- $Search = "^(shell\\s+.+)";
- $Replace = '"#".$1';
-
- if (!&Patch::Patch($InetdConf, [[1, "Substitution", $Search, $Replace]])) {
- &ErrorMsg("Did not succeed with patch", $InetdConf);
- }
-
- # Modify the /etc/inet/services file
- # append the ta-rauth to the services file
- $Services = "/etc/inet/services";
- &Patch::FileOpen($Services);
-
- $ServicesAppend = "ta-rauth 601/tcp rauth";
-
- if (!&Patch::Patch($Services, [[0, "EOF", "", $ServicesAppend]])) {
- &ErrorMsg("Did not succeed with patch", $Services);
- }
-}
-
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-# An InstallGuide for installing the AFS aware file system checker
-# For Sun systems running Solaris 2.6
-#
-
-sub vfsck {
-my($ufs, , $afs, $file);
-$ufs = "/usr/lib/fs/ufs";
-$afs = "/usr/lib/fs/afs";
-
-&CreateDir($afs);
-&Copy("root.server/etc/vfsck", "$afs/fsck");
-
-&ErrorsAreFatal(1);
-$rc = opendir(UFS, $ufs);
-&ErrorMsg("Could not opendir", $ufs) if (!$rc);
-while($file = readdir(UFS)) {
- next if ($file eq ".");
- next if ($file eq "..");
- next if ($file eq "fsck");
- next if (-e "$afs/$file");
- &Symlink("$ufs/$file", "$afs/$file"); };
-&ErrorsAreFatal(0);
-closedir(UFS);
-}
-
+++ /dev/null
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-#
-# This software has been released under the terms of the IBM Public
-# License. For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-package Patch;
-@Functions = ("Substitution", "Insert", "Replace", "EOF");
-
-#
-# PatchError(Msg)
-#
-# This subroutine will print a message and exit.
-#
-# Msg is the message to print
-#
-sub PatchError {
- my ($msg) = @_;
- die $msg;
-}
-
-#
-# FileOpen(File)
-#
-# This subroutine will open the given File for reading and
-# will open a second file with the name File.new for writing.
-# The subroutine will save these newly-created subroutines in
-# an associative array for Patch to use.
-#
-# This subroutine will cause the whole program to exit if it
-# cannot open either file.
-#
-
-sub FileOpen {
- my($File) = @_;
- my $FH = "${File}_FH";
- my $FHOUT = "${FH}OUT";
- my $Error = (defined(&main::ErrorMsg)) ? \&main::ErrorMsg : \&PatchError;
- open($FH, "$File") || &$Error("Cannot open $File: $!");
- open($FHOUT, ">$File.new") || &$Error("Cannot open $File.new: $!");
- $FileHandles{$File} = [$FH, $FHOUT];
-}
-
-#
-# Verbose()
-#
-# This subroutine will cause the subroutine Patch to be in verbose
-# mode if called.
-#
-
-sub Verbose {
- $Verbose = 1;
-}
-
-#
-# Debug()
-#
-# This subroutine will cause the subroutine Patch to be in verbose
-# mode if called.
-#
-
-sub Debug {
- $Debug = 1;
-}
-
-#
-# sub Patch(File, ActionArrayReference)
-# File = string
-# ActionArrayReference = reference to an array of Actions
-# Actions = (RE, Function, SearchLines, NewLines)
-#
-# This subroutine will try to patch a given File by following
-# the given Actions provided in the Actions array passed to it
-# as a reference
-#
-# The Action array reference passed to it contains references to
-# the actual Actions to be taken.
-#
-# The Actions are implemented as an array as described above.
-# RE is a flag to use Regular Expressions or not (1 or 0)
-# Function is one of Substitution, Insert, Replace or EOF
-# SearchLines is a newline-separated string of lines to search for.
-# NewLines is a newline-separated string of lines which will be new
-# to the given file.
-#
-# ASUMPTIONS
-#
-# EOF: The function will do nothing and return Success if the New lines are
-# present anywhere in the file.
-# Returns 1 on Success, 0 otherwise
-#
-
-sub Patch {
- my ($File, $ActionList) = @_; # the filename and list reference
- my ($status, $ActionRef, $FH, $tmp, $RE);
- local($NEWFH);
- my ($SearchPatternArrayRef, $NewPatternArrayRef, $ArrayRef);
- my $ReplacementMatchRef;
- local ($SearchBufferRef, $NewBufferRef);
- my ($SearchLines, $NewLines, @SearchArray, @NewArray, $Function);
- my (%NewIndex, %NewBuffer, %SearchIndex, %SearchBuffer);
- my (%NewMatch, %NewLinesPrinted, %ReplacementMatch);
- local ($NewIndexRef, $SearchIndexRef);
- local $CurrentLine = 0;
- my $Index = 0;
- my (@Done);
- my $Errors = 0;
- my $NextLoop;
- my $Redo = 0;
-
- # Check to see if the Action List is empty
- if ($#$ActionList == -1) {
- print "No Actions specified for $File\n";
- return 0;
- }
-
- # Check to see if the given file has already been opened with FileOpen
- if (!exists($FileHandles{$File})) {
- print "$File has not been previously opened with Patch::FileOpen\n";
- return 0;
- }
-
- print "\nAttempting to patch $File...\n" if ($Verbose);
-
- $ArrayRef = $FileHandles{$File};
- ($FH, $NEWFH) = @$ArrayRef;
-
- # Initialize the assoc. arrays which will be used to keep track of indices
- # and the previously found matches
-
- foreach $ActionRef (@$ActionList) {
- my (@SearchPatternArray, @NewPatternArray);
- $Done{$Index} = 0;
-
- $SearchIndex{$Index} = 0;
- $SearchBuffer{$Index} = [];
- $NewIndex{$Index} = 0;
- $NewBuffer{$Index} = [];
- $NewLinesPrinted{$Index} = 0;
- &DebugPrint("SearchBuffer[$Index]= $SearchBuffer{$Index}");
- &DebugPrint("NewBuffer[$Index]= $NewBuffer{$Index}");
-
- # recreate the new Action Array as follows:
- # 0) Index
- # 1) Function
- # 2) Reference to SearchPattern array
- # 3) Reference to NewPattern array
- # 4) NewLines string
-
- # remove the RE flag from the list
- $RE = shift @$ActionRef;
-
- # prepend the Index number to the front of the list
- unshift(@$ActionRef, $Index);
-
- if (!grep(/$$ActionRef[1]/, @Functions)) {
- Abort("Unknown function: $$ActionRef[1]");
- return 0;
- }
- if (!$RE && $$ActionRef[1] eq "Substitution") {
- Abort("The Substitution function requires a Regular Expression");
- return 0;
- }
-
- # Since we will be using split with a limit, we need to get rid of the
- # extra new-line
- chomp $$ActionRef[2];
-
- @SearchArray = split(/\n/, $$ActionRef[2], length($$ActionRef[2]));
- if ($$ActionRef[1] ne "EOF" && $#SearchArray == -1) {
- Abort("Cannot have an empty Search parameter");
- return 0;
- }
- # The Search parameter for Substitution is limited to a single line
- if ($$ActionRef[1] eq "Substitution" &&
- $#SearchArray) {
- Abort("Cannot have a multi-line Search parameter with Substitution:");
- &PrintArray(\@SearchArray);
- return 0;
- }
- # delimit each character if we are not expecting regular expressions
- foreach $tmp (@SearchArray) {
- $tmp = quotemeta $tmp if (!$RE);
- push(@SearchPatternArray, $tmp);
- }
- $$ActionRef[2] = \@SearchPatternArray;
-
- chomp $$ActionRef[3];
- @NewArray = split(/\n/, $$ActionRef[3],length($$ActionRef[3]));
- if ($#NewArray == -1) {
- Abort("Cannot have an empty New parameter");
- return 0;
- }
- # The Replace parameter for Substitution is limited to a single line
- if ($$ActionRef[1] eq "Substitution" &&
- $#NewArray) {
- Abort("Cannot have a multi-line Replace parameter with Substitution:");
- &PrintArray(\@NewArray);
- return 0;
- }
- # delimit each character if we are not expecting regular expressions
- foreach $tmp (@NewArray) {
- $tmp = quotemeta $tmp if (!$RE);
- push(@NewPatternArray, $tmp);
- }
- splice(@$ActionRef, 3, 0, \@NewPatternArray);
-
- # Now we have to create a new string out of the Search and Replace(New)
- # parameters if the function is Substitution. This new string is used
- # to determine whether or not we have a file which has successfully
- # been substituted.
- if ($$ActionRef[1] eq "Substitution") {
- my $search = $$ActionRef[2][0];
- my $replace = $$ActionRef[3][0];
- my $new, $tmp, $end;
- my @matches;
- my $index = 0;
- # split the search string on the opening '(' if there are any
- my (@search) = split(/\(/, $search);
- foreach $tmp (@search) {
- # Check to see if the '(' was was preceeded by a '\' which indicates
- # that a match was not being performed.
- # If so prepend the current string plus the '(', lost during the split
- # to the next string.
- if (substr($tmp, -1, 1) eq "\\") {
- $search[$index+1] = "$search[$index]($search[$index+1]";
- next;
- }
- next if (!$index++); # the first array value is before a match
- # Now we need to find the occurrence of the final ')' trying not
- # to match a '\)'. Once this is found we can push the entire string
- # that was orignally between the '()' into our matches buffer.
- my $end = $[;
- while (($end = index($tmp, ")", $end)) >= $[) {
- if (substr($tmp, $end-1, 1) eq "\\") {
- } else {
- push(@matches, substr($tmp, 0, $end));
- }
- $end++;
- }
- }
-
- # if the sequence "#" is found then the intent was to place a #
- # character in the replace portion as a comment in the string to
- # pacify the perl preprocessor. The quotes need to be stripped in the
- # ReplacementMatch string.
- $replace =~ s/"#"/#/;
-
- # Split the Replace line on the input '.' characters which are used to
- # show how to combine the replace piece of the s/// function
- my (@new) = split(/\./, $replace);
- if (!$#new) {
- # We are not expecting to have any $# replacements since there were
- # no '.' characters in the string. In this case just use the actual
- # string when trying to look for that new string.
- $ReplacementMatch{$Index} = shift @new;
- } else {
- # Go through the '.'-separated components of the string and replace
- # any occurrence of $# with the original search pattern.
- # Otherwise just save the original string.
- $index = 0;
- while ($tmp = shift @new) {
- &DebugPrint("\t\t$tmp");
- if ($tmp =~ /^\$\d+$/) {
- &DebugPrint("\tFound a match");
- $ReplacementMatch{$Index} .= $matches[$index];
- $index++;
- } else {
- $ReplacementMatch{$Index} .= $tmp;
- }
- }
- &DebugPrint("index=$index, matches = $#matches");
- if ($index != $#matches+1) {
- &Abort("Substitution does not have matching matches");
- return 0;
- }
- }
- }
-
- if ($Debug) {
- print "Index = $$ActionRef[0]\n";
- print "Function = $$ActionRef[1]\n";
- print "Search = ";
- &PrintArray($$ActionRef[2]);
- print "New = ";
- &PrintArray($$ActionRef[3]);
- print "NewLines = $$ActionRef[4]\n";
- print "ReplacementMatch = $ReplacementMatch{$Index}\n";
- print "----------------------------\n";
- }
- $Index++;
- }
-
- MAINLOOP: while (<$FH>) {
- if (!$Redo) {
- $CurrentLine++;
- $LineReferences{$CurrentLine} = 0;
- }
- $Redo = 0;
- &DebugPrint("$CurrentLine=>$_");
- $NextLoop = 0;
- chomp; # get rid of newline character
- # go through each action on this line of the file
- foreach $ActionRef (@$ActionList) {
- ($Index, $Function, $SearchPatternArrayRef, $NewPatternArrayRef,
- $NewLines) = @$ActionRef;
- # define references to asociative array values for easier use
- $NewIndexRef = \$NewIndex{$Index};
- $NewBufferRef = $NewBuffer{$Index};
- $SearchIndexRef = \$SearchIndex{$Index};
- $SearchBufferRef = $SearchBuffer{$Index};
- $NewMatchRef = \$NewMatch{$Index};
- $$NewMatchRef = 0;
- $NewLinesPrintedRef = \$NewLinesPrinted{$Index};
- $ReplacementMatchRef = \$ReplacementMatch{$Index};
-
- # if the function is a substitution and the current line matches the
- # Search pattern then try to perform the substitution and flag that
- # the action as done if successful
- if ($Function eq "Substitution" &&
- /$$SearchPatternArrayRef[$$SearchIndexRef]/) {
- &DebugPrint("\tSubstitution");
- &VerbosePrint("Substituting line in $File...");
- $Done{$Index} |= s/$$SearchPatternArrayRef[$$SearchIndexRef]/"$$NewPatternArrayRef[$$NewIndexRef]"/ee;
- }
-
- # This is a look-ahead check to see if the "New" lines will be matched
- $$NewMatchRef = 1 if (($$NewIndexRef <= $#$NewPatternArrayRef) &&
- /$$NewPatternArrayRef[$$NewIndexRef]/i);
-
- # "EOF" function has no use for the Search paramaters
- # see if the "Search" lines can be found
- if ($Function ne "EOF" &&
- ($$SearchIndexRef <= $#$SearchPatternArrayRef) &&
- /$$SearchPatternArrayRef[$$SearchIndexRef]/) {
- &DebugPrint("Search");
- # print the "New" buffer and clear the indices if we were previsouly
- # tracking the "New" lines and we no longer are
- &ResetNew(1) if $$NewIndexRef && !$$NewMatchRef;
- # see if all of the "Search" lines been found
- if ($$SearchIndexRef == $#$SearchPatternArrayRef) {
- if ($Function eq "Insert") {
- # reset the search indices and print the buffer and current line
- &ResetSearch(1);
- print $NEWFH "$_\n";
- &DebugPrint("\tSearch Printed: $_");
- } else {
- # just reset the search indices
- &ResetSearch(0);
- }
- # now that we are caught up with everything else, print the newlines
- print $NEWFH "$NewLines\n";
- &DebugPrint("\tSearch Printed: $NewLines");
- # mark that the new lines have already been printed
- $$NewLinesPrintedRef = 1 if ($$NewMatchRef && $Function ne "Insert");
- $$NewLinesPrintedRef = 1 if ($Function eq "Insert");
- &VerbosePrint ("Replacing line[s] in $File...");
- $Done{$Index} = 1; # flag that this Action is done
- } else {
- # add this line to the buffer and increment the index to the next
- # "Search" line
- &AddToBuffer($SearchBufferRef, $_);
- $$SearchIndexRef++;
- }
- # set flag so that we don't check for inconsistencies
- $NextLoop = 1;
- }
- # check to see if we already determined a "New" match
- if ($$NewMatchRef) {
- &DebugPrint("New");
- # clean the "Search" buffer if it is partial and the $NextLine was not
- # set before. If it was set, then search is still active
- &ResetSearch(1) if ($$SearchIndexRef && !$NextLoop);
- &DebugPrint("$NextLoop and $$NewLinesPrintedRef");
- # see if all of the "New" lines have been found
- if ($$NewIndexRef == $#$NewPatternArrayRef) {
- # reset the Search indices but do not print the buffer
- &ResetSearch(0);
- # print the buffered lines aw sell as the current line unless they
- # were already printed by "Search"; reset the indices
- if (!$NextLoop && !$$NewLinesPrintedRef) {
- &ResetNew(1);
- print $NEWFH "$_\n";
- &DebugPrint("\tNew printed $_");
- } else {
- # the lines were previously printed; just reset everything
- &ResetNew(0);
- }
- $Done{$Index} = 1; # flag that this Action is done
- } else {
- # add the current line to the New buffer unless this line has
- # already been printed
- &AddToBuffer($NewBufferRef, $_) if (!$$NewLinesPrintedRef);
- $$NewIndexRef++;
- }
- # set flag so that we don't check for inconsistencies
- $NextLoop = 1;
- }
-
- # If the substitution action hasn't already been successful during
- # this run and the current line matches the replacement line
- # then mark the action as done
- if (!$Done{$Index} && $Function eq "Substitution" &&
- /$$ReplacementMatchRef/) {
- &DebugPrint("\tFound the ReplacementMatch");
- $Done{$Index} = 1; # flag that this Action is done
- }
-
- # if this point is reached and the NewIndex is not at zero, then some but
- # not all of the New lines were found.
- # skip this block if Search or New already succeeded
- if (!$NextLoop && $$NewIndexRef) {
- &DebugPrint("New check");
- &ResetNew(1);
- $Redo = 1;
- redo MAINLOOP;
- }
-
- # if this point is reached and the SearchIndex is not at zero, then some
- # but not all of the Search lines were found
- # skip this block if Search or New already succeeded
- if (!$NextLoop && $$SearchIndexRef) {
- &DebugPrint("Search check");
- &ResetSearch(!$Done{$Index});
- $Redo = 1;
- redo MAINLOOP;
- }
-
- # print the new lines at the end of the file if the function is "EOF", the
- # next read on the file will be EOF and the new lines are not already
- # present at the end of the file
- if (!$NextLoop && $Function eq "EOF" && eof($FH) && !$Done{$Index}) {
- &DebugPrint("EOF");
- print $NEWFH "$_\n";
- print $NEWFH "$NewLines\n";
- &DebugPrint("\tEOF Printed: $_\n$NewLines");
- &VerbosePrint("Appending new line[s] to end of $File...");
- $Done{$Index} = 1;
- next MAINLOOP;
- }
- }
- if (!$NextLoop) {
- print $NEWFH "$_\n";
- &DebugPrint("\tPrinted: $_");
- }
- }
- close $FH;
- close $NEWFH;
-
- $Errors = grep(/0/, values %Done);
- if (!$Errors ) {
- $status = system("diff $File $File.new > /dev/null 2>&1");
- if ($status) {
- if (!rename($File, "$File.old")) {
- print "Could not rename $File to $File.old: $!";
- }
- if (!rename("$File.new", $File)) {
- print "Could not rename $File.new to $File: $!";
- } else {
- &CopyStat("$File.old", $File);
- }
- }
- else {
- &VerbosePrint ("No difference. Leaving the old $File intact");
- unlink("$File.new");
- }
- return 1;
- }
- else {
- &VerbosePrint("$Errors Action[s] did not succeed.");
- unlink("$File.new");
- return 0;
- }
-}
-
-#
-# AddToBuffer(BufferRef, Line)
-#
-# This subroutine will add a given line to a buffer
-#
-# BufferRef is a reference to a buffer
-# Line is the line to be added
-#
-
-sub AddToBuffer {
- my($BufferRef, $line) = @_;
- push(@$BufferRef, [$CurrentLine, $line]);
- $LineReferences{$CurrentLine}++;
- &DebugPrint("Adding to buffer[$BufferRef]=>$CurrentLine, $line");
- &DebugPrint("References for $CurrentLine is $LineReferences{$CurrentLine}");
-}
-
-#
-# ResetSearch(Print)
-#
-# This subroutine will reset the Search variables
-#
-# Print indicates whether or not to print the contents of the SearchBuffer
-#
-
-sub ResetSearch {
- my($print) = @_;
- my($BufferedLine);
- my($ref, $lineno);
- &DebugPrint("ResetSearch");
- if ($print) {
- # print the lines that were matched up to this point since they were not
- # printed before
- foreach $ref (@$SearchBufferRef) {
- ($lineno, $BufferedLine) = @$ref;
- &DebugPrint("References for $lineno is $LineReferences{$lineno}");
- if ($LineReferences{$lineno} == 1) {
- print $NEWFH "$BufferedLine\n";
- &DebugPrint("\tResetSearch Printed: $BufferedLine [$SearchBufferRef,$lineno]");
- } else {
- &DebugPrint("not printing [$SearchBufferRef]=>$lineno,$BufferedLine\n");
- }
- $LineReferences{$lineno}--;
- }
- }
- # reset the Search indices and buffer
- $$SearchIndexRef = 0;
- @$SearchBufferRef = ();
-}
-
-#
-# ResetNew()
-#
-# This subroutine will reset the New variables
-#
-# Print indicates whether or not to print the contents of the NewBuffer
-#
-
-sub ResetNew {
- my ($print) = @_;
- my($BufferedLine);
- my($ref, $lineno);
- &DebugPrint("ResetNew");
- if ($print) {
- # print the lines that were matched up to this point since they were not
- # printed before
- foreach $ref (@$NewBufferRef) {
- ($lineno, $BufferedLine) = @$ref;
- &DebugPrint("References for $lineno is $LineReferences{$lineno}");
- if ($LineReferences{$lineno} == 1) {
- print $NEWFH "$BufferedLine\n";
- &DebugPrint("\tResetNew Printed: $BufferedLine [$NewBufferRef,$lineno]");
- } else {
- &DebugPrint("not printing [$NewBufferRef]=>$lineno,$BufferedLine\n");
- }
- $LineReferences{$lineno}--;
- }
- }
- # reset the New indices and buffer
- $$NewIndexRef = 0;
- @$NewBufferRef = ();
-}
-
-#
-# Abort()
-#
-# This subroutine will print an abort message
-#
-
-sub Abort {
- my ($mesg) = @_;
- print "Aborting, $mesg\n";
-}
-
-#
-# VerbosePrint(Msg)
-#
-# This subroutine will print a message if the program is running in verbose
-# mode set earlier by Verbose()
-#
-# Msg is the message to print
-#
-
-sub VerbosePrint {
- my ($mesg) = @_;
- print "\t$mesg\n" if ($Verbose);
-}
-
-#
-# DebugPrint(Msg)
-#
-# This subroutine will print a message if the program is running in Debug
-# mode set earlier by Debug()
-#
-# Msg is the message to print
-#
-
-sub DebugPrint {
- my ($mesg) = @_;
- print "$mesg\n" if ($Debug);
-}
-
-#
-# PrintArray(Array)
-#
-# This subroutine will print out all of the contents of an array.
-# Primarily used in debugging.
-#
-# Array is the array to print
-#
-sub PrintArray {
- my ($arrayref) = @_;
- my ($element);
- foreach $element (@$arrayref) {
- print "$element\n";
- }
-}
-
-#
-# CopyStat(SrcFile, DstFile)
-#
-# This subroutine copies the mode, uid and gid from SrcFile to DstFile
-#
-sub CopyStat {
- my ($user, $group, $srcfile, $destfile, $mode, $rc, @statinfo);
- $srcfile = shift @_;
- $destfile = shift @_;
- @statinfo = stat($srcfile);
- $mode = $statinfo[2];
- $user = $statinfo[4];
- $group = $statinfo[5];
- &VerbosePrint("Copying owner,group,mode of \"$srcfile\" to \"$destfile\"");
- $rc = chown $user, $group, $destfile;
- &VerbosePrint("Could not change mode bits of", $destfile) if (!$rc);
- $rc = chmod $mode, $destfile;
- &VerbosePrint("Could not change mode bits of", $destfile) if (!$rc);
-}
-
-1;