IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 17643


Ignore:
Timestamp:
May 12, 2008, 2:09:06 PM (18 years ago)
Author:
jhoblitt
Message:

modernize neb-touch API calls

Location:
trunk/Nebulous
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Nebulous/Changes

    r17610 r17643  
    22
    330.09
     4    - modernize neb-touch API calls
    45    - change Nebulous::Client->replicate() to check the md5sum of the
    56      replicated file and to not leave empty instances laying around if there
  • trunk/Nebulous/bin/neb-touch

    r16232 r17643  
    33# Copyright (C) 2007-2008  Joshua Hoblitt
    44#
    5 # $Id: neb-touch,v 1.7 2008-01-25 20:54:04 jhoblitt Exp $
     5# $Id: neb-touch,v 1.8 2008-05-13 00:09:06 jhoblitt Exp $
    66
    77use strict;
     
    2525) || pod2usage( 2 );
    2626
    27 my $file = shift;
     27my $key = shift;
    2828
    2929pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV;
     
    3131    unless $server;
    3232pod2usage( -msg => "missing file operand", exitval => 2 )
    33     unless defined $file;
     33    unless defined $key;
    3434
    3535my $neb = Nebulous::Client->new(
     
    4040    unless defined $neb;
    4141
    42 unless (scalar @{$neb->find_objects($file)}) {
    43     if (defined $volume) {
    44         $neb->create($file, $volume)
    45             or die "failed to create Nebulous key $file";
    46     } else {
    47         $neb->create($file)
    48             or die "failed to create Nebulous key $file";
    49     }
     42unless ($neb->stat($key)) {
     43    my $fh = $neb->create($key, $volume)
     44        or die "failed to create Nebulous key: $key";
    5045}
    5146
Note: See TracChangeset for help on using the changeset viewer.