+print "\n";
+print "Additional Notes:\n";
+print "\n";
+print " o I see that you have your GLOBUS_LOCATION environmental variable\n";
+print " set to:\n";
+print "\n";
+print " \t\"$gpath\"\n";
+print "\n";
+print " Remember to keep this variable set (correctly) when you want to\n";
+print " use the executables that came with this package.\n";
+print "\n";
+print " After that you may execute, for example:\n";
+print "\n";
+print " \t\$ . \$GLOBUS_LOCATION/etc/globus-user-env.sh\n";
+print "\n";
+print " to prepare your environment for running the gsi_openssh\n";
+print " executables.\n";
+
+if ( !getPrivilegeSeparation() )
+{
+ print "\n";
+ print " o For System Administrators:\n";
+ print "\n";
+ print " If you are going to run the GSI-OpenSSH server, we recommend\n";
+ print " enabling privilege separation. Although this package supports\n";
+ print " this feature, your system appears to require some additional\n";
+ print " configuration.\n";
+ print "\n";
+ print " To enable privilege separation:\n";
+ print "\n";
+ print " \tIf the system user 'sshd' does not already exist,\n";
+ print " \tadd a user with that username.\n";
+ print "\n";
+ print " \tVerify that /var/empty exists, is owned by root,\n";
+ print " \tand has a mode of 0700.\n";
+ print "\n";
+ print " \tEnable the feature UsePrivilegeSeparation in\n";
+ print " \t\$GLOBUS_LOCATION/etc/ssh/sshd_config.\n";
+}
+
+#
+# give the user a chance to read all of this output
+#
+
+print "\n";
+print "Press <return> to continue... ";
+$trash = <STDIN>;
+
+print "\n";
+print "---------------------------------------------------------------------\n";
+print "$myname: Finished configuring package 'gsi_openssh'.\n";
+
+exit;
+
+#
+# subroutines
+#
+
+### initPRNGHash( )
+#
+# initialize the PRNG pathname hash
+#
+
+sub initPRNGHash( )
+{
+ #
+ # standard prng to executable conversion names
+ #
+
+ addPRNGCommand("\@PROG_LS\@", "ls");
+ addPRNGCommand("\@PROG_NETSTAT\@", "netstat");
+ addPRNGCommand("\@PROG_ARP\@", "arp");
+ addPRNGCommand("\@PROG_IFCONFIG\@", "ifconfig");
+ addPRNGCommand("\@PROG_PS\@", "ps");
+ addPRNGCommand("\@PROG_JSTAT\@", "jstat");
+ addPRNGCommand("\@PROG_W\@", "w");
+ addPRNGCommand("\@PROG_WHO\@", "who");
+ addPRNGCommand("\@PROG_LAST\@", "last");
+ addPRNGCommand("\@PROG_LASTLOG\@", "lastlog");
+ addPRNGCommand("\@PROG_DF\@", "df");
+ addPRNGCommand("\@PROG_SAR\@", "sar");
+ addPRNGCommand("\@PROG_VMSTAT\@", "vmstat");
+ addPRNGCommand("\@PROG_UPTIME\@", "uptime");
+ addPRNGCommand("\@PROG_IPCS\@", "ipcs");
+ addPRNGCommand("\@PROG_TAIL\@", "tail");
+
+ print "Determining paths for PRNG commands...\n";
+
+ $paths = determinePRNGPaths();
+
+ return;
+}
+
+### getDirectoryPaths( )
+#
+# return an array ref containing all of the directories in which we should search
+# for our listing of executable names.
+#
+
+sub getDirectoryPaths( )
+{
+ #
+ # read in the PATH environmental variable and prepend a set of 'safe'
+ # directories from which to test PRNG commands.
+ #
+
+ $path = $ENV{PATH};
+ $path = "/bin:/usr/bin:/sbin:/usr/sbin:/etc:" . $path;
+ @dirs = split(/:/, $path);
+
+ #
+ # sanitize each directory listed in the array.
+ #
+
+ @dirs = map {
+ $tmp = $_;
+ $tmp =~ s:/+:/:g;
+ $tmp =~ s:^\s+|\s+$::g;
+ $tmp;
+ } @dirs;
+
+ return \@dirs;
+}
+
+### addPRNGCommand( $prng_name, $exec_name )
+#
+# given a PRNG name and a corresponding executable name, add it to our list of
+# PRNG commands for which to find on the system.
+#
+
+sub addPRNGCommand
+{
+ my($prng_name, $exec_name) = @_;
+
+ prngAddNode($prng_name, $exec_name);
+}
+
+### copyPRNGFile( )
+#
+# read in ssh_prng_cmds.in, translate the program listings to the paths we have
+# found on the local system, and then write the output to ssh_prng_cmds.
+#
+
+sub copyPRNGFile
+{
+ my($fileInput, $fileOutput);
+ my($mode, $uid, $gid);
+ my($data);
+
+ if ( isPresent("/dev/random") && !isForced() )