Changeset 16159 for trunk/DataStore/scripts/dsget
- Timestamp:
- Jan 18, 2008, 5:22:47 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/DataStore/scripts/dsget (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/DataStore/scripts/dsget
r15290 r16159 1 1 #!/usr/bin/env perl 2 2 3 # Copyright (C) 2006 Joshua Hoblitt3 # Copyright (C) 2006-2008 Joshua Hoblitt 4 4 # 5 # $Id: dsget,v 1. 8 2007-10-12 01:25:18jhoblitt Exp $5 # $Id: dsget,v 1.9 2008-01-19 03:22:47 jhoblitt Exp $ 6 6 7 7 use strict; … … 9 9 10 10 use vars qw( $VERSION ); 11 $VERSION = '0.0 1';11 $VERSION = '0.02'; 12 12 13 13 use DataStore; … … 19 19 use Pod::Usage qw( pod2usage ); 20 20 21 my ($uri, $bytes, $md5, $nebulous, $filename, $ node, $server);21 my ($uri, $bytes, $md5, $nebulous, $filename, $volume, $server); 22 22 23 23 $server = $ENV{'NEB_SERVER'} unless $server; … … 26 26 'uri|u=s' => \$uri, 27 27 'bytes|m=s' => \$bytes, 28 'nebulous|n' => \$nebulous,29 ' node|n=s' => \$node,28 'nebulous|n' => \$nebulous, 29 'volume|v=s' => \$volume, 30 30 'server|s=s' => \$server, 31 31 'md5|m=s' => \$md5, … … 38 38 -exitval => 3, 39 39 ) unless defined $uri and defined $filename; 40 41 # --volume implies --nebulous 42 if ($volume) { 43 $nebulous |=1; 44 } 40 45 41 46 my %p = ( … … 100 105 unless defined $neb; 101 106 102 my $fh = $neb->open_create( $filename, $ node )107 my $fh = $neb->open_create( $filename, $volume ) 103 108 or die "Nebulous can't create key $filename"; 104 109 open(my $src_fh, $tmpfilename) or die "can't open file $tmpfilename: $!"; … … 128 133 129 134 dsget --uri <uri> --filename <filename> [--bytes <nbytes>] [--md5 <hex>] 135 [--nebulous] [--volume <volume>] 130 136 131 137 =head1 DESCRIPTION … … 155 161 Optional, the md5check is skipped if no value is specified. 156 162 163 =item * --nebulous|-n 164 165 Flag to enable C<nebulous> support. When set C<--filename> is used as the 166 Nebulous key. 167 168 Optional. 169 170 =item * --volume|-v <volume> 171 172 The volume ID to request the first Nebulous instance be stored on. 173 174 Optional, implies C<--nebulous> 175 157 176 =back 158 177 … … 171 190 =head1 COPYRIGHT 172 191 173 Copyright (C) 2006 Joshua Hoblitt. All rights reserved.192 Copyright (C) 2006-2008 Joshua Hoblitt. All rights reserved. 174 193 175 194 This program is free software; you can redistribute it and/or modify it under
Note:
See TracChangeset
for help on using the changeset viewer.
