/[smeserver]/rpms/e-smith-packetfilter/sme10/e-smith-packetfilter-2.6.0-bz11122-bz11089-systemd-event.patch
ViewVC logotype

Annotation of /rpms/e-smith-packetfilter/sme10/e-smith-packetfilter-2.6.0-bz11122-bz11089-systemd-event.patch

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


Revision 1.2 - (hide annotations) (download)
Sat Feb 13 04:48:27 2021 UTC (3 years, 4 months ago) by jpp
Branch: MAIN
CVS Tags: e-smith-packetfilter-2_6_0-4_el7_sme, e-smith-packetfilter-2_6_0-5_el7_sme, e-smith-packetfilter-2_6_0-8_el7_sme, e-smith-packetfilter-2_6_0-6_el7_sme, e-smith-packetfilter-2_6_0-7_el7_sme, HEAD
Changes since 1.1: +0 -5 lines
* Fri Feb 12 2021 Jean-Philipe Pialasse <tests@pialasse.com> 2.6.0-4.sme
- remove /usr/lib/systemd/system-preset/80-koozali-packetfilter.preset [SME: 10958]

1 jpp 1.1 diff -Nur e-smith-packetfilter-2.6.0.old/createlinks e-smith-packetfilter-2.6.0/createlinks
2     --- e-smith-packetfilter-2.6.0.old/createlinks 2007-01-26 20:51:31.000000000 -0500
3     +++ e-smith-packetfilter-2.6.0/createlinks 2020-11-10 23:23:21.649000000 -0500
4     @@ -2,7 +2,7 @@
5    
6     use esmith::Build::CreateLinks qw(:all);
7    
8     -templates2events("/etc/ulogd.conf", qw(post-install post-upgrade));
9     +templates2events("/etc/ulogd.conf", qw(post-install post-upgrade e-smith-packetfilter-update));
10    
11     # conf-masq
12    
13     @@ -13,11 +13,12 @@
14     network-delete
15     remoteaccess-update
16     email-update
17     + e-smith-packetfilter-update
18     ));
19    
20     -foreach (qw(console-save ip-change network-create network-delete remoteaccess-update))
21     +foreach (qw(console-save ip-change network-create network-delete remoteaccess-update e-smith-packetfilter-update))
22     {
23     - safe_symlink("adjust", "root/etc/e-smith/events/$_/services2adjust/masq");
24     + safe_symlink("reload", "root/etc/e-smith/events/$_/services2adjust/masq");
25     }
26    
27     my %service2order =
28     @@ -29,5 +30,22 @@
29    
30     foreach my $service (keys %service2order)
31     {
32     - service_link_enhanced($service, $service2order{$service}, 7);
33     +# removed for systemd
34     +# service_link_enhanced($service, $service2order{$service}, 7);
35     }
36     +
37     +#systemd
38     +foreach my $target (qw(multi-user sme-server))
39     +{
40     +system('mkdir -p root/usr/lib/systemd/system/'.$target.'.target.wants/');
41     +
42     +foreach my $unit (qw(
43     + masq.service
44     + ))
45     + {
46     + symlink("../$unit",
47     + "root/usr/lib/systemd/system/$target.target.wants/$unit")
48     + or die "Can't symlink to root/usr/lib/systemd/system/$target.target.wants/$unit: $!";
49     + }
50     +}
51     +
52     diff -Nur e-smith-packetfilter-2.6.0.old/root/usr/lib/systemd/system/masq.service e-smith-packetfilter-2.6.0/root/usr/lib/systemd/system/masq.service
53     --- e-smith-packetfilter-2.6.0.old/root/usr/lib/systemd/system/masq.service 1969-12-31 19:00:00.000000000 -0500
54     +++ e-smith-packetfilter-2.6.0/root/usr/lib/systemd/system/masq.service 2020-11-10 23:02:53.426000000 -0500
55     @@ -0,0 +1,18 @@
56     +[Unit]
57     +Description=masq, the Koozali SME Server firewall script
58     +Before=network-pre.target
59     +Wants=network-pre.target
60     +Conflicts=iptables.service ip6tables.service ebtables.service ipset.service nftables.service firewalld.service
61     +
62     +[Service]
63     +Type=oneshot
64     +ExecStartPre=/sbin/e-smith/service-status masq
65     +ExecStart=/etc/rc.d/init.d/masq start
66     +ExecStop=/etc/rc.d/init.d/masq stop
67     +ExecReload=/etc/rc.d/init.d/masq adjust
68     +RemainAfterExit=yes
69     +
70     +
71     +[Install]
72     +WantedBy=sme-server.target
73     +

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