]> andersk Git - gssapi-openssh.git/blobdiff - setup/setup-openssh.pl
o Add relative paths to the beginning of the original package build
[gssapi-openssh.git] / setup / setup-openssh.pl
index 05d393635e1c9e76800f57578bb657902e71e6f1..d703bf30dbf2e259c831f60103e10ccafaf6115f 100644 (file)
@@ -331,6 +331,65 @@ sub fixpaths
     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";
This page took 0.035504 seconds and 4 git commands to generate.