IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 30, 2010, 9:31:50 AM (16 years ago)
Author:
eugene
Message:

updates from trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20100621/Nebulous-Server/bin/neb-host

    r27114 r28794  
    1616use Pod::Usage qw( pod2usage );
    1717
    18 my ($host, $state,
     18my ($host, $state, $note,
    1919    $db, $dbhost, $dbpass, $dbuser,
    2020    $allocate, $available, $debug);
     
    5151    'host=s'         => \$host,
    5252    'state=s'        => \$state,
    53    
     53    'note=s'         => \$note,
    5454    'db=s'           => \$db,
    5555    'dbhost=s'       => \$dbhost,
    5656    'dbuser=s'       => \$dbuser,
    5757    'dbpass=s'       => \$dbpass,
     58
    5859   
    5960    ) || pod2usage( 2 );
     
    101102    $set{'v.allocate'} = $allocate if defined $allocate;
    102103    $set{'v.available'} = $available if defined $available;
    103    
     104    $set{'v.note'} = $note if defined $note;
     105
    104106    eval {
    105107        my ($q, @bind) = sql_interp("UPDATE volume AS v SET", \%set, "WHERE", \%constraint);
     
    134136$dbh->commit;
    135137
    136 my $format  = "%-15s %-15s %-10s %-10s %-10s %-10s\n";
    137 my @columns = qw(host name mounted allocate available xattr);
     138my $format  = "%-15s %-15s %-7s %-8s %-9s %-5s %s\n";
     139my @columns = qw(host name mounted allocate available xattr note);
    138140printf($format, @columns);
    139141
    140142while (my $row = $query->fetchrow_hashref) {
     143    unless ((exists($$row{ 'note' })) && (defined($$row{ 'note' }))) {
     144        $$row{ 'note' } = '-';
     145    }
     146
    141147    printf($format, @$row{@columns});
    142148}
     
    153159
    154160    neb-host [<nebulous host> <nebulous state>]
     161    [--note '<status note>']
    155162    [--host <nebulous host>] [--state <up|down|repair>]
    156163    [--dbhost <database host>] [--db <database name>]
     
    168175=over 4
    169176
     177=item * --note <status note>
     178
     179Set a status note for the specified volume.
     180
    170181=item * --host <nebulous host>
    171182
Note: See TracChangeset for help on using the changeset viewer.