summaryrefslogtreecommitdiffabout
authorSergey Poznyakoff <gray@gnu.org.ua>2017-02-10 15:50:31 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2017-02-10 15:50:31 (GMT)
commitd8ee8a56a3a5ac156f8d840f050b8223fb955636 (patch) (side-by-side diff)
tree62ac4c1112ea28de5d0b23221db2dcaacbf82ab0
parent8a916702efcd22685b02d7dd2760de8e55a2868b (diff)
downloadsyslogck-d8ee8a56a3a5ac156f8d840f050b8223fb955636.tar.gz
syslogck-d8ee8a56a3a5ac156f8d840f050b8223fb955636.tar.bz2
Add building infrastructureHEADmaster
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--.gitignore10
-rw-r--r--MANIFEST6
-rw-r--r--Makefile.PL20
-rw-r--r--bootstrap.pl61
-rw-r--r--syslogck8
5 files changed, 102 insertions, 3 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..b43081a
--- a/dev/null
+++ b/.gitignore
@@ -0,0 +1,10 @@
+.emacs*
+*~
+/MYMETA.json
+/MYMETA.yml
+Makefile
+/syslogck-*.tar.gz
+/tmp
+/blib
+/pm_to_blib
+/inc
diff --git a/MANIFEST b/MANIFEST
new file mode 100644
index 0000000..344ac44
--- a/dev/null
+++ b/MANIFEST
@@ -0,0 +1,6 @@
+Changes
+LICENSE
+Makefile.PL
+MANIFEST This list of files
+inc/ExtUtils/AutoInstall.pm
+syslogck
diff --git a/Makefile.PL b/Makefile.PL
new file mode 100644
index 0000000..8e9812f
--- a/dev/null
+++ b/Makefile.PL
@@ -0,0 +1,20 @@
+# -*- perl -*-
+use strict;
+use lib 'inc';
+use ExtUtils::AutoInstall (
+ -core => {
+ 'Getopt::Long' => 2.34,
+ 'File::Basename' => 2.84,
+ 'Pod::Usage' => 1.51,
+ 'Pod::Man' => 2.25,
+ 'Sys::Syslog' => 0.29
+ }
+);
+
+WriteMakefile(NAME => 'syslogck',
+ ABSTRACT_FROM => 'syslogck',
+ VERSION_FROM => 'syslogck',
+ AUTHOR => 'Sergey Poznyakoff <gray@gnu.org>',
+ LICENSE => 'gpl',
+ EXE_FILES => [ 'syslogck' ]
+);
diff --git a/bootstrap.pl b/bootstrap.pl
new file mode 100644
index 0000000..90db16a
--- a/dev/null
+++ b/bootstrap.pl
@@ -0,0 +1,61 @@
+#! /usr/bin/perl
+# This file is part of acmeman.
+# Copyright (C) 2014, 2017 Sergey Poznyakoff <gray@gnu.org>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+use strict;
+use CPAN;
+use Cwd qw(getcwd);
+use File::Path qw(mkpath);
+
+####
+my $incdir = "inc/ExtUtils";
+my $topdir = getcwd;
+
+my $modname = "ExtUtils::AutoInstall";
+
+my $mod = CPAN::Shell->expandany($modname) or die "Can't expand $modname";
+my $file = $mod->inst_file;
+my $dir;
+
+if (defined($file)) {
+ print "$modname installed at $file\n";
+ if (-f $file) {
+ $file =~ s#/[^/]+\.pm$##;
+ if (-d $file) {
+ $dir = $file;
+ } else {
+ die "Can't find $modname directory";
+ }
+ }
+} else {
+ print "Getting $modname\n";
+ my $distro = $mod->get or die "Can't get distribution for $modname";
+ $dir = $distro->dir;
+}
+
+$file = "$dir/$incdir/AutoInstall.pm";
+$file = "$dir/AutoInstall.pm" unless (-f $file);
+-f $file or die "$file not found";
+
+use autodie;
+chdir $topdir;
+mkpath $incdir unless -d $incdir;
+chdir $incdir;
+no autodie;
+unlink "AutoInstall.pm";
+use autodie;
+symlink $file, "AutoInstall.pm";
+
diff --git a/syslogck b/syslogck
index 808dadd..0427a00 100644
--- a/syslogck
+++ b/syslogck
@@ -7,6 +7,8 @@ use Pod::Usage;
use Pod::Man;
use Getopt::Long qw(:config gnu_getopt no_ignore_case);
+our $VERSION = '0.99';
+
use constant {
EX_OK => 0,
EX_USAGE => 64,
@@ -39,9 +41,9 @@ can be changed by supplying the name of the file in the command line. Multiple
arguments are allowed.
The configuration parser is very permissive. It selects only lines that
-can reliably be parsed as traditional syslog selector lines. This allows to
-use B<syslogck> with any flavor of syslog that allows for traditional
-configuration (e.g. B<rsyslogd>).
+can reliably be parsed as traditional syslog selector lines, and silently
+ignores the rest. This allows to use B<syslogck> with any flavor of syslog
+that allows for traditional configuration (e.g. B<rsyslogd>).
On success (test message appeared in the log), B<syslogck> silently exits with
code B<0>. If the message did not appear in the log within the time out period,

Return to:

Send suggestions and report system problems to the System administrator.