summaryrefslogtreecommitdiff
path: root/scripts/is_port_available.pl
blob: acf3e6e356f640a802c225a468928e3f1a736bc3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/perl
# Check to see if the supplied IPv4 or IPv6 address is an existing local address

use strict;
use lib "/opt/vyatta/share/perl5";
use Vyatta::Misc;

my $port = $ARGV[0];

if(!defined($port) || !is_port_available($port)) {
    exit 1;
} else {
    exit 0;
}