<COMMENT> things break, that's what </COMMENT>
<Build_Step>mkdir -p INSTALLDIR_GPTMACRO/setup/globus</Build_Step>
- <Build_Step>cp setup-openssh INSTALLDIR_GPTMACRO/setup/globus/setup-openssh</Build_Step>
- <Build_Step>cp setup-openssh.pl INSTALLDIR_GPTMACRO/setup/globus/setup-openssh.pl</Build_Step>
- <Build_Step>cp ssh_config INSTALLDIR_GPTMACRO/setup/globus/ssh_config</Build_Step>
- <Build_Step>cp sshd_config INSTALLDIR_GPTMACRO/setup/globus/sshd_config</Build_Step>
- <Build_Step>cp moduli INSTALLDIR_GPTMACRO/setup/globus/moduli</Build_Step>
+ <Build_Step>cp ./setup-openssh INSTALLDIR_GPTMACRO/setup/globus/setup-openssh</Build_Step>
+ <Build_Step>cp ./setup-openssh.pl INSTALLDIR_GPTMACRO/setup/globus/setup-openssh.pl</Build_Step>
+ <Build_Step>cp ./ssh_config INSTALLDIR_GPTMACRO/setup/globus/ssh_config</Build_Step>
+ <Build_Step>cp ./sshd_config INSTALLDIR_GPTMACRO/setup/globus/sshd_config</Build_Step>
+ <Build_Step>cp ./moduli INSTALLDIR_GPTMACRO/setup/globus/moduli</Build_Step>
<Build_Step>mkdir -p INSTALLDIR_GPTMACRO/share/gsi-openssh/contrib</Build_Step>
return 0;
}
+sub fixGlobusLocation
+{
+ $data = readFile($initfile);
+ $data =~ s|@GLOBUS_LOCATION@|$gpath|g;
+ writeFile($data);
+}
+
+### readFile( $filename )
+#
+# reads and returns $filename's contents
+#
+
+sub readFile
+{
+ my ($filename) = @_;
+ my $data;
+
+ open (IN, "$filename") || die "Can't open '$filename': $!";
+ $/ = undef;
+ $data = <IN>;
+ $/ = "\n";
+ close(IN);
+
+ return $data;
+}
+
+### writeFile( $filename, $fileinput )
+#
+# create the inputs to the ssl program at $filename, appending the common name to the
+# stream in the process
+#
+
+sub writeFile
+{
+ my ($filename, $fileinput) = @_;
+
+ #
+ # test for a valid $filename
+ #
+
+ if ( !defined($filename) || (length($filename) lt 1) )
+ {
+ die "Filename is undefined";
+ }
+
+ if ( ( -e "$filename" ) && ( ! -w "$filename" ) )
+ {
+ die "Cannot write to filename '$filename'";
+ }
+
+ #
+ # write the output to $filename
+ #
+
+ open(OUT, ">$filename");
+ print OUT "$fileinput";
+ close(OUT);
+}
+
print "---------------------------------------------------------------\n";
print "Hi, I'm the setup script for the gsi_openssh package! There\n";
print "are some last minute details that I've got to set straight\n";