/[smecontribs]/rpms/smeserver-fail2ban/contribs10/smeserver-fail2ban-0.1.18-bz12008-backup.patch
ViewVC logotype

Contents of /rpms/smeserver-fail2ban/contribs10/smeserver-fail2ban-0.1.18-bz12008-backup.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download)
Sat Jul 30 03:04:39 2022 UTC (2 years, 3 months ago) by jpp
Branch: MAIN
CVS Tags: smeserver-fail2ban-0_1_18-29_el7_sme
* Fri Jul 29 2022 Jean-Philippe Pialasse <tests@pialasse.com> 0.1.18-29.sme
- add to core backup [SME: 12008]

1 diff -Nur --no-dereference smeserver-fail2ban-0.1.18.old/createlinks smeserver-fail2ban-0.1.18/createlinks
2 --- smeserver-fail2ban-0.1.18.old/createlinks 2022-07-29 22:37:24.969000000 -0400
3 +++ smeserver-fail2ban-0.1.18/createlinks 2022-07-29 23:04:07.547000000 -0400
4 @@ -9,6 +9,8 @@
5
6 foreach my $file (qw(
7 /etc/systemd/system-preset/49-koozali.preset
8 + /etc/backup-data.d/smeserver-fail2ban.include
9 + /etc/e-smith/templates/etc/dar/DailyBackup.dcf
10 ))
11 {
12 templates2events( $file, $event );
13 diff -Nur --no-dereference smeserver-fail2ban-0.1.18.old/root/etc/e-smith/templates/etc/backup-data.d/smeserver-fail2ban.include/template-begin smeserver-fail2ban-0.1.18/root/etc/e-smith/templates/etc/backup-data.d/smeserver-fail2ban.include/template-begin
14 --- smeserver-fail2ban-0.1.18.old/root/etc/e-smith/templates/etc/backup-data.d/smeserver-fail2ban.include/template-begin 1969-12-31 19:00:00.000000000 -0500
15 +++ smeserver-fail2ban-0.1.18/root/etc/e-smith/templates/etc/backup-data.d/smeserver-fail2ban.include/template-begin 2022-07-29 22:59:07.986000000 -0400
16 @@ -0,0 +1,20 @@
17 +#Only non rpm owned files are backupe there
18 +{
19 +use RPM2;
20 +my $rpm_db = RPM2->open_rpm_db();
21 +
22 +my @dirs = qw(/etc/fail2ban/action.d
23 +/etc/fail2ban/fail2ban.d
24 +/etc/fail2ban/filter.d
25 +/etc/fail2ban/jail.d
26 +);
27 +
28 +foreach my $some_dir (@dirs) {
29 + opendir(my $dh, $some_dir) || die "Can't open $some_dir: $!";
30 + while ( (my $file = readdir $dh) ) {
31 + next if $file =~ /^\.{1,2}$/;
32 + $OUT .= "$some_dir/$file\n" unless $rpm_db->find_by_file("$some_dir/$file");
33 + }
34 + closedir $dh;
35 +}
36 +}
37 diff -Nur --no-dereference smeserver-fail2ban-0.1.18.old/root/etc/e-smith/templates/etc/dar/DailyBackup.dcf/41go-into-smeserver-fail2ban smeserver-fail2ban-0.1.18/root/etc/e-smith/templates/etc/dar/DailyBackup.dcf/41go-into-smeserver-fail2ban
38 --- smeserver-fail2ban-0.1.18.old/root/etc/e-smith/templates/etc/dar/DailyBackup.dcf/41go-into-smeserver-fail2ban 1969-12-31 19:00:00.000000000 -0500
39 +++ smeserver-fail2ban-0.1.18/root/etc/e-smith/templates/etc/dar/DailyBackup.dcf/41go-into-smeserver-fail2ban 2022-07-29 23:02:58.224000000 -0400
40 @@ -0,0 +1,22 @@
41 +#Only non rpm owned files are backupe there
42 +{
43 +use RPM2;
44 +my $rpm_db = RPM2->open_rpm_db();
45 +
46 +my @dirs = qw(/etc/fail2ban/action.d
47 +/etc/fail2ban/fail2ban.d
48 +/etc/fail2ban/filter.d
49 +/etc/fail2ban/jail.d
50 +);
51 +
52 +foreach my $some_dir (@dirs) {
53 + opendir(my $dh, $some_dir) || die "Can't open $some_dir: $!";
54 + while ( (my $file = readdir $dh) ) {
55 + next if $file =~ /^\.{1,2}$/;
56 + my $backdir = $some_dir =~ s/^\///;
57 + $OUT .= "--go-into $backdir/$file\n" unless $rpm_db->find_by_file("$some_dir/$file");
58 + }
59 + closedir $dh;
60 +}
61 +}
62 +

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed