aboutsummaryrefslogtreecommitdiff
path: root/lib/App/Mangemanche/Command/ipadd.pm
blob: 7a68d82533cb34afc871230b3770162cfc5a6b79 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
package App::Mangemanche::Command::ipadd;
use strict;
use warnings;
use parent 'App::Mangemanche::Command';
use App::Mangemanche::Command ':exit_codes';

sub run {
    my $self = shift;
    $self->SUPER::run;
    $self->usage_error("required parameters missing") unless @ARGV == 1;
    my $ip = shift @ARGV;
    unless ($self->agent->ipadd($ip)) {
	$self->abend(EX_FAIL, $self->agent->error_message);
    }
}
1;

=head1 NAME

ipadd - adds a single IP to the ping903 ip list

=head1 SYNOPSIS

B<ipadd> I<IP>

=head1 DESCRIPTION

Adds I<IP> to the mutable IP list of the running B<ping903> daemon.

=head1 OPTIONS

=head2 Informative options

=over 4

=item B<-?>

Display short help summary.

=item B<--usage>

Display command line usage summary.

=item B<--help>

Display a detailed program manual.

=back

=head1 SEE ALSO

L<ping903>,
L<mangemache>,
L<ipdel>.

=cut

Return to:

Send suggestions and report system problems to the System administrator.