Removed /usr/local from CDPATH
[clearscm.git] / clearadm / filesystems.cgi
1 #!/usr/local/bin/perl
2
3 =pod
4
5 =head1 NAME $RCSfile: filesystems.cgi,v $
6
7 Filesystems
8
9 =head1 VERSION
10
11 =over
12
13 =item Author
14
15 Andrew DeFaria <Andrew@ClearSCM.com>
16
17 =item Revision
18
19 $Revision: 1.11 $
20
21 =item Created:
22
23 Mon Oct 25 11:10:47 PDT 2008
24
25 =item Modified:
26
27 $Date: 2011/02/14 14:50:37 $
28
29 =back
30
31 =head1 SYNOPSIS
32
33  Usage filesystems.cgi: [-u|sage] [-ve|rbose] [-d|ebug]
34                         [-s|ystem <system>]
35
36  Where:
37    -u|sage:   Displays usage
38    -v|erbose: Be verbose
39    -d|ebug:   Output debug messages
40    
41    -s|sytem:  System to report on filesystems (Default: all)
42
43 =head2 DESCRIPTION
44
45 This script displays all known filesystems
46
47 =cut
48
49 use strict;
50 use warnings;
51
52 use FindBin;
53 use Getopt::Long;
54 use CGI qw (:standard :cgi-lib *table start_Tr end_Tr start_td end_td);
55 use CGI::Carp 'fatalsToBrowser';
56
57 use lib "$FindBin::Bin/lib", "$FindBin::Bin/../lib";
58
59 use Clearadm;
60 use ClearadmWeb;
61 use Display;
62 use Utils;
63
64 my $VERSION  = '$Revision: 1.11 $';
65   ($VERSION) = ($VERSION =~ /\$Revision: (.*) /);
66   
67 my $subtitle = 'Filesystems Status';
68
69 my $system = param 'system';
70
71 my $clearadm;
72
73 # Main
74 GetOptions (
75   usage      => sub { Usage },
76   verbose    => sub { set_verbose },
77   debug      => sub { set_debug },
78   'system=s' => \$system
79 ) or Usage 'Invalid parameter';
80
81 $system ||= '';
82
83 # Announce ourselves
84 verbose "$FindBin::Script v$VERSION";
85
86 $subtitle .= $system eq '' 
87            ? ': All Systems' 
88            : ': ' . ucfirst $system;
89
90 $clearadm = Clearadm->new;
91
92 heading $subtitle;
93
94 display h1 {class => 'center'}, $subtitle;
95
96 displayFilesystem ($system);
97
98 footing;
99
100 =pod
101
102 =head1 CONFIGURATION AND ENVIRONMENT
103
104 DEBUG: If set then $debug is set to this level.
105
106 VERBOSE: If set then $verbose is set to this level.
107
108 TRACE: If set then $trace is set to this level.
109
110 =head1 DEPENDENCIES
111
112 =head2 Perl Modules
113
114 L<CGI>
115
116 L<CGI::Carp|CGI::Carp>
117
118 L<FindBin>
119
120 L<Getopt::Long|Getopt::Long>
121
122 =head2 ClearSCM Perl Modules
123
124 =begin man 
125
126  Clearadm
127  ClearadmWeb
128  Display
129  Utils
130
131 =end man
132
133 =begin html
134
135 <blockquote>
136 <a href="http://clearscm.com/php/scm_man.php?file=clearadm/lib/Clearadm.pm">Clearadm</a><br>
137 <a href="http://clearscm.com/php/scm_man.php?file=clearadm/lib/ClearadmWeb.pm">ClearadmWeb</a><br>
138 <a href="http://clearscm.com/php/scm_man.php?file=lib/Display.pm">Display</a><br>
139 <a href="http://clearscm.com/php/scm_man.php?file=lib/Utils.pm">Utils</a><br>
140 </blockquote>
141
142 =end html
143
144 =head1 BUGS AND LIMITATIONS
145
146 There are no known bugs in this script
147
148 Please report problems to Andrew DeFaria <Andrew@ClearSCM.com>.
149
150 =head1 LICENSE AND COPYRIGHT
151
152 Copyright (c) 2010, ClearSCM, Inc. All rights reserved.
153
154 =cut