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,22 @@ |
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( |
23 |
+/etc/fail2ban |
24 |
+/etc/fail2ban/action.d |
25 |
+/etc/fail2ban/fail2ban.d |
26 |
+/etc/fail2ban/filter.d |
27 |
+/etc/fail2ban/jail.d |
28 |
+); |
29 |
+ |
30 |
+foreach my $some_dir (@dirs) { |
31 |
+ opendir(my $dh, $some_dir) || die "Can't open $some_dir: $!"; |
32 |
+ while ( (my $file = readdir $dh) ) { |
33 |
+ next if $file =~ /^\.{1,2}$/; |
34 |
+ $OUT .= "$some_dir/$file\n" unless $rpm_db->find_by_file("$some_dir/$file"); |
35 |
+ } |
36 |
+ closedir $dh; |
37 |
+} |
38 |
+} |