/[pdpsoft]/trunk/nl.nikhef.ndpf.tools/vocachedir/pbs.in.patch
ViewVC logotype

Contents of /trunk/nl.nikhef.ndpf.tools/vocachedir/pbs.in.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 63 - (show annotations) (download) (as text)
Mon Feb 16 21:02:29 2009 UTC (13 years, 5 months ago) by davidg
File MIME type: text/x-patch
File size: 1600 byte(s)
vo cache dir script added

1 *** pbs.in.orig 2008-11-24 16:37:11.000000000 +0100
2 --- pbs.in 2009-02-16 21:56:49.000000000 +0100
3 ***************
4 *** 366,371 ****
5 --- 366,398 ----
6 $rsh_env .= $tuple->[0] . '="' . $tuple->[1] . "\";\n"
7 . 'export ' . $tuple->[0] . ";\n";
8 }
9 +
10 + ###############################################################################
11 + # Extract VO name for later use in variable definition
12 + ###############################################################################
13 + my $proxylocation;
14 + my $voname;
15 + foreach my $tuple ($description->environment()) {
16 + $proxylocation = $tuple->[1] if $tuple->[0] eq "X509_USER_PROXY";
17 + }
18 + if ( defined ($proxylocation) ) {
19 + print JOB '# Inspecting proxy '.$proxylocation."\n";
20 + [ -x "/opt/glite/bin/voms-proxy-info" ] and do {
21 + my $voname=`/opt/glite/bin/voms-proxy-info -file "$proxylocation" -vo 2>/dev/null`;
22 + chomp($voname);
23 + if ( $voname =~ /[a-zA-Z][\w\d\.]*/ ) {
24 + print JOB "# VO name from proxy is $voname\n";
25 + $rsh_env .= 'VONAME="' . $voname . "\";\n"
26 + . 'export ' . "VONAME" . ";\n";
27 + push(@new_env, "VONAME" . '="' . $voname . '"');
28 + } else {
29 + print JOB "# VO name from proxy is NOT valid\n";
30 + }
31 + };
32 + } else {
33 + print JOB "# Proxy location undefined, VO not set\n";
34 + }
35 +
36 ###############################################################################
37 # TeraGrid -- Do not reset library variables
38 # 06/30/2005, JP Navarro <navarro@mcs.anl.gov>
39

grid.support@nikhef.nl
ViewVC Help
Powered by ViewVC 1.1.28