]> andersk Git - gssapi-openssh.git/blobdiff - setup/setup-openssh.pl
lost last two lines when applied the patch?
[gssapi-openssh.git] / setup / setup-openssh.pl
index 5ba02f3e0f5d039bf09459ac855f05cc63b314a6..bf506c83c01a08f03746073b74b7463b8adbb451 100644 (file)
@@ -4,12 +4,23 @@
 #   performing actions that originally occurred during the package's
 #   'make install' phase.
 #
-# Large parts adapted from 'fixpath', a tool found in openssh-3.0.2p1.
+# Parts adapted from 'fixpath', a tool found in openssh-3.0.2p1.
 #
 # Send comments/fixes/suggestions to:
 # Chase Phillips <cphillip@ncsa.uiuc.edu>
 #
 
+#
+# Get user's GPT_LOCATION since we may be installing this using a new(er)
+# version of GPT.
+#
+
+$gptpath = $ENV{GPT_LOCATION};
+
+#
+# And the old standby..
+#
+
 $gpath = $ENV{GLOBUS_LOCATION};
 if (!defined($gpath))
 {
@@ -21,7 +32,14 @@ if (!defined($gpath))
 # do so
 #
 
-@INC = (@INC, "$gpath/lib/perl");
+if (defined($gptpath))
+{
+    @INC = (@INC, "$gptpath/lib/perl", "$gpath/lib/perl");
+}
+else
+{
+    @INC = (@INC, "$gpath/lib/perl");
+}
 
 require Grid::GPT::Setup;
 
@@ -190,7 +208,7 @@ sub runkeygen
 
 sub fixpaths
 {
-    my $g;
+    my $g, $h;
 
     print "\nStage 4: Translating strings in config and man files..\n";
 
@@ -218,22 +236,22 @@ sub fixpaths
     # Files on which to perform path translations
     #
 
-    %files = (
-        "${sysconfdir}/ssh_config" => 0,
-        "${sysconfdir}/sshd_config" => 0,
-        "${sysconfdir}/moduli" => 0,
-        "${mandir}/${mansubdir}1/scp.1" => 0,
-        "${mandir}/${mansubdir}1/ssh-add.1" => 0,
-        "${mandir}/${mansubdir}1/ssh-agent.1" => 0,
-        "${mandir}/${mansubdir}1/ssh-keygen.1" => 0,
-        "${mandir}/${mansubdir}1/ssh-keyscan.1" => 0,
-        "${mandir}/${mansubdir}1/ssh.1" => 0,
-        "${mandir}/${mansubdir}8/sshd.8" => 0,
-        "${mandir}/${mansubdir}8/sftp-server.8" => 0,
-        "${mandir}/${mansubdir}1/sftp.1" => 0,
+    @files = (
+        "${sysconfdir}/ssh_config",
+        "${sysconfdir}/sshd_config",
+        "${sysconfdir}/moduli",
+        "${mandir}/${mansubdir}1/scp.1",
+        "${mandir}/${mansubdir}1/ssh-add.1",
+        "${mandir}/${mansubdir}1/ssh-agent.1",
+        "${mandir}/${mansubdir}1/ssh-keygen.1",
+        "${mandir}/${mansubdir}1/ssh-keyscan.1",
+        "${mandir}/${mansubdir}1/ssh.1",
+        "${mandir}/${mansubdir}8/sshd.8",
+        "${mandir}/${mansubdir}8/sftp-server.8",
+        "${mandir}/${mansubdir}1/sftp.1",
         );
 
-    for my $f (keys %files)
+    for my $f (@files)
     {
         $f =~ /(.*\/)*(.*)$/;
 
@@ -244,6 +262,13 @@ sub fixpaths
 
         $g = "$f.tmp";
 
+        #
+        # What is $f's filename? (taken from the qualified path)
+        #
+
+        $h = $f;
+        $h =~ s#^.*/##;
+
         #
         # Grab the current mode/uid/gid for use later
         #
@@ -295,9 +320,9 @@ sub fixpaths
 
         chmod($mode, $f);
         chown($uid, $gid, $f);
-    } # for $f
 
-    print "complete.\n";
+        print "$h\n";
+    } # for $f
 
     return 0;
 }
@@ -310,10 +335,12 @@ print "are some last minute details that I've got to set straight\n";
 print "in the config and man files, along with generating the ssh keys\n";
 print "for this machine (if it doesn't already have them).\n";
 print "\n";
-print "I like to install my config-related files in:
-print "  ${sysconfdir}\n";
-print "and, if you choose to continue, you will find a backup of the\n";
-print "original files in:\n";
+print "I like to install my config-related files in:\n";
+print "  ${sysconfdir}/\n";
+print "\n";
+print "These files may overwrite your previously existing configuration\n";
+print "files.  If you choose to continue, you will find a backup of\n";
+print "those original files in:\n";
 print "  ${backupdir}/\n";
 print "\n";
 print "Your host keys will remain untouched if they are already present.\n";
@@ -343,15 +370,12 @@ $metadata->finish();
 print "\n";
 print "$myname: Finished configuring package 'gsi_openssh'.\n";
 print "\n";
-print "You are required to set the following variables in your environment\n";
-print "to ensure that the gsi_ssh package works correctly:\n";
+print "I see that you have your GLOBUS_LOCATION environmental variable\n";
+print "set to:\n";
+print "  $gpath\n";
 print "\n";
-print "\GSI_SCP_LOC=\"${bindir}/scp.real\"\n";
-print "\GSI_SFTP_LOC=\"${bindir}/sftp.real\"\n";
-print "\GSI_SSH_LOC=\"${bindir}/ssh\"\n";
-print "\GSI_SSHD_LOC=\"${sbindir}/sshd.real\"\n";
-print "\GSI_SSH_CONFIG_LOC=\"${sysconfdir}/ssh_config\"\n";
-print "\GSI_SSHD_CONFIG_LOC=\"${sysconfdir}/sshd_config\"\n";
+print "Remember to keep this variable set (correctly) when you want\n";
+print "to use the executables that came with this package.\n";
 print "---------------------------------------------------------------\n";
 
 #
@@ -396,11 +420,24 @@ sub query_boolean
     $foo = <STDIN>;
     ($bar) = split //, $foo;
 
-    if ($bar ne $nondefault)
+    if ( grep(/\s/, $bar) )
+    {
+        # this is debatable.  all whitespace means 'default'
+
+        $bar = $default;
+    }
+    elsif ($bar ne $default)
+    {
+        # everything else means 'nondefault'.
+
+        $bar = $nondefault;
+    }
+    else
     {
+        # extraneous step.  to get here, $bar should be eq to $default anyway.
+
         $bar = $default;
     }
 
     return $bar;
 }
-
This page took 0.055953 seconds and 4 git commands to generate.