Changeset 28492 for trunk/Nebulous-Server/bin/neb-host
- Timestamp:
- Jun 24, 2010, 3:56:40 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/Nebulous-Server/bin/neb-host (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Nebulous-Server/bin/neb-host
r27114 r28492 16 16 use Pod::Usage qw( pod2usage ); 17 17 18 my ($host, $state, 18 my ($host, $state, $note, 19 19 $db, $dbhost, $dbpass, $dbuser, 20 20 $allocate, $available, $debug); … … 51 51 'host=s' => \$host, 52 52 'state=s' => \$state, 53 53 'note=s' => \$note, 54 54 'db=s' => \$db, 55 55 'dbhost=s' => \$dbhost, 56 56 'dbuser=s' => \$dbuser, 57 57 'dbpass=s' => \$dbpass, 58 58 59 59 60 ) || pod2usage( 2 ); … … 101 102 $set{'v.allocate'} = $allocate if defined $allocate; 102 103 $set{'v.available'} = $available if defined $available; 103 104 $set{'v.note'} = $note if defined $note; 105 104 106 eval { 105 107 my ($q, @bind) = sql_interp("UPDATE volume AS v SET", \%set, "WHERE", \%constraint); … … 134 136 $dbh->commit; 135 137 136 my $format = "%-15s %-15s %- 10s %-10s %-10s %-10s\n";137 my @columns = qw(host name mounted allocate available xattr );138 my $format = "%-15s %-15s %-7s %-8s %-9s %-5s %s\n"; 139 my @columns = qw(host name mounted allocate available xattr note); 138 140 printf($format, @columns); 139 141 140 142 while (my $row = $query->fetchrow_hashref) { 143 unless ((exists($$row{ 'note' })) && (defined($$row{ 'note' }))) { 144 $$row{ 'note' } = '-'; 145 } 146 141 147 printf($format, @$row{@columns}); 142 148 }
Note:
See TracChangeset
for help on using the changeset viewer.
