App-DHCPClientUtils

 view release on metacpan or  search on metacpan

scripts/multi-homed-routing.pl  view on Meta::CPAN

#!/usr/bin/env perl

# vim: tabstop=4 shiftwidth=4 softtabstop=4 expandtab:

use 5.014;
use strict;
use warnings;


=head1 NAME

multi-homed-routing.pl - Policy-based IPv4 routing generator

scripts/multi-homed-routing.pl  view on Meta::CPAN

#           table =>    Routing-table to use from /etc/iproute2/rt_tables
#           address =>  IPv4 address of the interface
#           network =>  Network of the interface in the form, IPv4-address/netmask
#           gateway =>  IPv4 address of the gateway
#           weight =>   Weight of the route
sub routing_rules($$$)
{
    my ($interfaces, $default_policy, $single_policy_default_interface) = @_;

    my $config = {
        INTERPOLATE => 1,               # expand "$var" in plain text
        EVAL_PERL   => 1,               # evaluate Perl code blocks
        PRE_CHOMP   => 0,
        POST_CHOMP  => 1 # CHOMP_GREEDY,
    };

    # create Template object
    my $tt = Template->new($config);
    my $template = <<END_OF_FILE
#!/bin/bash

# vim: tabstop=4 shiftwidth=4 softtabstop=4 expandtab:


# This script is auto-generated output of command:
# \\\$ [% cmd_line %]


# This script can be called as part of SysV initscripts.
# For example, in RedHat Linux, symlink this as file /sbin/ifup-local
# See Red Hat Enterprise Linux7 Networking Guide for details.

scripts/network-interface-info.pl  view on Meta::CPAN

#!/usr/bin/env perl

# vim: tabstop=4 shiftwidth=4 softtabstop=4 expandtab:

use Net::Interface qw(full_inet_ntop ipV6compress type :afs :iffs :iffIN6 :iftype :scope);
use Net::IP;
use Net::ISC::DHCPClient;
use POSIX qw();
use Getopt::Long;
use Pod::Usage;
use Data::Dumper;

use warnings;



( run in 0.909 second using v1.01-cache-2.11-cpan-5b529ec07f3 )