Last change
on this file since 1834 was
656,
checked in by nanardon, 15 years ago
|
- error messages goes to STDERR
|
File size:
614 bytes
|
Line | |
---|
1 | #!/bin/env perl |
---|
2 | |
---|
3 | use strict; |
---|
4 | use warnings; |
---|
5 | use LATMOS::Accounts::Acls; |
---|
6 | use Getopt::Long; |
---|
7 | use Pod::Usage; |
---|
8 | |
---|
9 | =head1 NAME |
---|
10 | |
---|
11 | la-acls - Test acls file |
---|
12 | |
---|
13 | =head1 SYNOPSIS |
---|
14 | |
---|
15 | la-acls [-d] acl_file |
---|
16 | |
---|
17 | =cut |
---|
18 | |
---|
19 | GetOptions( |
---|
20 | 'd|dump' => \my $dump, |
---|
21 | 'help' => sub { pod2usage(0) }, |
---|
22 | ) or pod2usage(); |
---|
23 | |
---|
24 | =head1 OPTIONS |
---|
25 | |
---|
26 | =over 4 |
---|
27 | |
---|
28 | =item -d: dump the acl list content |
---|
29 | |
---|
30 | =back |
---|
31 | |
---|
32 | =cut |
---|
33 | |
---|
34 | if (!$ARGV[0]) {warn "You must specify 'acl_file', aborting\n"; pod2usage(); } |
---|
35 | |
---|
36 | if(my $acls = LATMOS::Accounts::Acls->new($ARGV[0])) { |
---|
37 | $acls->dump if ($dump); |
---|
38 | exit 0; |
---|
39 | } else { |
---|
40 | warn "Error during acls parsing\n"; |
---|
41 | exit 1; |
---|
42 | } |
---|
43 | |
---|
44 | |
---|
Note: See
TracBrowser
for help on using the repository browser.