Changeset 17454
- Timestamp:
- Apr 17, 2008, 5:12:25 PM (18 years ago)
- Location:
- trunk/Nebulous
- Files:
-
- 2 edited
-
Changes (modified) (1 diff)
-
bin/neb-df (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Nebulous/Changes
r17449 r17454 1 1 Revision history for Nebulous 2 3 0.09 4 - fix neb-df coding issues 2 5 3 6 0.08 Thu Apr 17 14:07:18 HST 2008 -
trunk/Nebulous/bin/neb-df
r17079 r17454 3 3 # Copyright (C) 2007 Joshua Hoblitt 4 4 # 5 # $Id: neb-df,v 1. 4 2008-03-21 01:36:59jhoblitt Exp $5 # $Id: neb-df,v 1.5 2008-04-18 03:12:25 jhoblitt Exp $ 6 6 7 7 use strict; … … 16 16 use Pod::Usage qw( pod2usage ); 17 17 18 my ($ db, $dbuser, $dbpass);18 my ($server); 19 19 20 $db = $ENV{'NEB_DB'} unless $db; 21 $dbuser = $ENV{'NEB_USER'} unless $dbuser; 22 $dbpass = $ENV{'NEB_PASS'} unless $dbpass; 20 $server = $ENV{'NEB_SERVER'} unless $server; 23 21 24 22 GetOptions( 25 'db=s' => \$db, 26 'user=s' => \$dbuser, 27 'pass=s' => \$dbpass, 23 'server|s=s' => \$server, 28 24 ) || pod2usage( 2 ); 29 25 26 my $pattern = shift; 27 30 28 pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV; 31 pod2usage( -msg => "Required options: -- db --user --pass", -exitval => 2 )32 unless $ db && $dbuser && $dbpass;29 pod2usage( -msg => "Required options: --server", -exitval => 2 ) 30 unless $server; 33 31 34 32 my $neb = Nebulous::Client->new( … … 49 47 = @$row; 50 48 51 my $path = $vol ->{path};52 my $total = $vol ->{total};53 my $used = $vol ->{used};49 my $path = $vol{path}; 50 my $total = $vol{total}; 51 my $used = $vol{used}; 54 52 my $available = $total - $used; 55 53 my $usedper = ($used / $total) * 100; 56 my $mountpoint = $vol ->{mountpoint};54 my $mountpoint = $vol{mountpoint}; 57 55 58 56 # indicated the part of the nebulous volume name that matches up with a
Note:
See TracChangeset
for help on using the changeset viewer.
