- Timestamp:
- May 3, 2010, 8:50:52 AM (16 years ago)
- Location:
- branches/simtest_nebulous_branches
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
DataStore/scripts/dsget (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/simtest_nebulous_branches
- Property svn:mergeinfo changed
-
branches/simtest_nebulous_branches/DataStore/scripts/dsget
r24374 r27840 28 28 $timeout, 29 29 @xattrs, 30 $no_proxy, 30 31 ); 31 32 … … 44 45 'timeout|t=s' => \$timeout, 45 46 'xattr|x=s' => \@xattrs, 47 'no-proxy' => \$no_proxy, 46 48 ) or pod2usage( 2 ); 47 49 … … 69 71 undef $copies; 70 72 } 71 if ($copies < 1) {73 elsif ($copies < 1) { 72 74 die "--copies must be >= 1"; 73 75 } … … 80 82 # default http request timeout is 30s 81 83 $timeout ||= 30; 84 $no_proxy = 0 if !defined $no_proxy; 82 85 83 86 my %p = ( … … 140 143 filename => $tmpfilename, 141 144 ua_args => { timeout => $timeout }, 145 no_proxy => $no_proxy, 142 146 ); 143 147 … … 207 211 if (defined $copies and $copies > 1) { 208 212 foreach (1 .. ($copies - 1)) { 209 $neb->replicate($filename , 'any')213 $neb->replicate($filename) 210 214 or die "failed to replicate $filename failed: $!"; 211 215 } … … 214 218 $tmp->flush or die "can't flush filehandle: $!"; 215 219 $tmp->sync or die "can't sync filehandle: $!"; 220 # set read and write permissions based on umask (ignore other bits) 221 my $umask = umask; 222 chmod 0666 ^ $umask, $tmpfilename or die "failed to chmod $tmpfilename"; 216 223 rename $tmpfilename, $filename 217 224 or die "renaming $tmpfilename to $filename failed: $!"; … … 232 239 =head1 NAME 233 240 234 gsget - download a file from a DataStore server241 dsget - download a file from a DataStore server 235 242 236 243 =head1 SYNOPSIS … … 296 303 The ammount of time (in seconds) to wait for a response from the DataStore 297 304 after making an HTTP request. The default is 30s. 305 306 Optional. 307 308 =item * --no-proxy 309 310 Do not load proxy environment variables. 298 311 299 312 Optional.
Note:
See TracChangeset
for help on using the changeset viewer.
