]> git.donarmstrong.com Git - debhelper.git/blob - dh_installlogcheck
releasing version 7.4.1
[debhelper.git] / dh_installlogcheck
1 #!/usr/bin/perl -w
2
3 =head1 NAME
4
5 dh_installlogcheck - install logcheck rulefiles into etc/logcheck/
6
7 =cut
8
9 use strict;
10 use Debian::Debhelper::Dh_Lib;
11
12 =head1 SYNOPSIS
13
14 B<dh_installlogcheck> [S<B<debhelper options>>]
15
16 =head1 DESCRIPTION
17
18 dh_installlogcheck is a debhelper program that is responsible for
19 installing logcheck rule files.
20
21 =head1 FILES
22
23 =over 4
24
25 =item debian/I<package>.logcheck.cracking
26
27 =item debian/I<package>.logcheck.violations
28
29 =item debian/I<package>.logcheck.violations.ignore
30
31 =item debian/I<package>.logcheck.ignore.workstation
32
33 =item debian/I<package>.logcheck.ignore.server
34
35 =item debian/I<package>.logcheck.ignore.paranoid
36
37 Each of these files, if present, are installed into corresponding
38 subdirectories of etc/logcheck/ in package build directories.
39
40 =back
41
42 =cut
43
44 init();
45
46 foreach my $package (@{$dh{DOPACKAGES}}) {
47         my $tmp=tmpdir($package);
48
49         foreach my $type (qw{ignore.d.workstation ignore.d.server
50                              ignore.d.paranoid cracking.d
51                              violations.d violations.ignore.d}) {
52                 my $typenod=$type;
53                 $typenod=~s/\.d//;
54                 my $logcheck=pkgfile($package,"logcheck.$typenod");
55                 if ($logcheck) {
56                         if (! -d "$tmp/etc/logcheck/$type") {
57                                 doit("install","-o",0,"-g",0,"-d","$tmp/etc/logcheck/$type");
58                         }
59                         my $packagenodot=$package; # run-parts..
60                         $packagenodot=~s/\./_/g;
61                         doit("install","-m","0644",$logcheck,"$tmp/etc/logcheck/$type/$packagenodot");
62                 }
63         }
64 }
65
66 =head1 SEE ALSO
67
68 L<debhelper(7)>
69
70 This program is a part of debhelper.
71     
72 =head1 AUTHOR
73
74 Jon Middleton <jjm@debian.org>
75
76 =cut