IPTables-IPv4-DBTarpit
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
## @cd DBTarpit && $(MAKE) relink_subdirs $(PASTHRU) #
## #
###########################################################
use vars qw($CONFIG);
use Config;
use Cwd qw(abs_path);
require 'lib/IPTables/IPv4/DBTarpit/Inst.pm';
import IPTables::IPv4::DBTarpit::Inst qw(:all);
if ((caller)[1]) {
hard_fail("Do not MAKE __PACKAGE__ as a sibling process
it contains directory sensitive components.");
}
my $CC = $Config{ccname};
my $OS = $Config{osname};
unless ($OS =~ /linux/) {
print STDERR "Only works on Linux with IPTABLES\n";
exit 0;
Makefile.PL view on Meta::CPAN
#
'${supported_os}'; # perl return
# */
|;
close H;
my $conf = 'config.db';
my $localconf = abs_path('./').'/'.$conf;
my $configtxt;
if ((caller)[0]) {
my $master = abs_path('../').'/'.$conf;
hard_fail("failed to access $_")
if ($_ = cpfromto($master,$localconf));
$CONFIG = do $localconf;
$configtxt = make_text($CONFIG);
}
else {
$configtxt = do 'inst/dialog.pl';
}
Tools/Makefile.PL view on Meta::CPAN
################################################################
## if built from a parent directory, #
## at install, the parent Makefile must execute #
## #
## as step immediately after 'all' #
## @cd Tools && $(MAKE) relink4_$(LINKTYPE)_install $(PASTHRU) #
## #
################################################################
unless ((caller)[1]) {
print "\n WARNING... Please run from the parent directory\n\n";
}
$rebuild = '.rebuild4test';
# generate a permanently OLD time for convenience
my($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime();
# YYCC MM DD HH MM current - 10 years
my $oldtime = sprintf("%04d%02d%02d%02d%02d ",$year+1890,$mon+1,$mday,$hour,$min);
my $relink_LD_RUN_PATH = '/lib:/usr/local/lib';
lib/IPTables/IPv4/DBTarpit/Inst.pm view on Meta::CPAN
=cut
sub write_conf {
my($file,$hp,$pre) = @_;
return "argument 2 is not a hash reference" unless ref $hp;
my $W = local *W;
return "could not open $file for write"
unless open($W,'>'.$file);
$file =~ m|([^/]+)$|;
my $whoami = (caller)[1];
print $W qq|# $1 |, scalar localtime(), q|
#
# This configuration file was automatically generated by '|. $whoami .q|'
#
# Don't edit this file, edit '|. $whoami .q|' instead.
#
my $CONFIG = {
|;
foreach(sort keys %$hp) {
next if $pre && $_ !~ /^$pre/;
( run in 2.310 seconds using v1.01-cache-2.11-cpan-1e74a51a04c )