/[smecontribs]/rpms/smeserver-libreswan/contribs10/smeserver-libreswan-0.5-Update-for-systemd.patch
ViewVC logotype

Contents of /rpms/smeserver-libreswan/contribs10/smeserver-libreswan-0.5-Update-for-systemd.patch

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


Revision 1.1 - (show annotations) (download)
Mon Mar 1 18:46:07 2021 UTC (3 years, 8 months ago) by brianr
Branch: MAIN
CVS Tags: smeserver-libreswan-0_5-36_el7_sme, smeserver-libreswan-0_5-35_el7_sme, HEAD
* Mon Mar 01 2021 Brian Read <brianr@bjsystems.co.uk> 0.5-35.sme
- Initial Import in SME10 tree  [SME: 11405]
- Update for systemd

1 diff -urN smeserver-libreswan-0.5.old/createlinks smeserver-libreswan-0.5/createlinks
2 --- smeserver-libreswan-0.5.old/createlinks 2021-03-01 10:35:08.971062159 +0000
3 +++ smeserver-libreswan-0.5/createlinks 2021-03-01 13:04:43.184784077 +0000
4 @@ -3,10 +3,31 @@
5 # Need some thought on when the templates should be expanded and when the action should be called.
6
7 use esmith::Build::CreateLinks qw(:all);
8 -my $event = "ipsec-update";
9
10 -# ipsec-update
11 +# our event specific for updating with yum without reboot
12 +$event = "smeserver-libreswan-update";
13 +#add here the path to your templates needed to expand
14 +#see the /etc/systemd/system-preset/49-koozali.preset should be present for systemd integration on all you yum update event
15 +
16 +foreach my $file (qw(
17 + /etc/systemd/system-preset/49-koozali.preset
18 +))
19 +{
20 + templates2events( $file, $event );
21 +}
22 +
23 +#action needed in case we have a systemd unit
24 +event_link("systemd-default", $event, "10");
25 +event_link("systemd-reload", $event, "50");
26
27 +#action specific to this package
28 +event_link("ipsec-update", $event, "60");
29 +
30 +#services we need to restart
31 +safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/ipsec");
32 +
33 +# ipsec-update
34 +my $event = "ipsec-update";
35 foreach (qw(
36 /etc/ipsec.conf
37 /etc/ipsec.secrets
38 @@ -32,10 +53,10 @@
39 event_link("ipsec-update", $event, "10");
40
41 # Runlevel init links.
42 -service_link_enhanced("ipsec", "S95", "7");
43 -service_link_enhanced("ipsec", "K21", "6");
44 -service_link_enhanced("ipsec", "K21", "0");
45 -service_link_enhanced("ipsec", "K21", "1");
46 +#service_link_enhanced("ipsec", "S95", "7");
47 +#service_link_enhanced("ipsec", "K21", "6");
48 +#service_link_enhanced("ipsec", "K21", "0");
49 +#service_link_enhanced("ipsec", "K21", "1");
50
51 safe_symlink("adjust", "root/etc/e-smith/events/$event/services2adjust/masq");
52
53 diff -urN smeserver-libreswan-0.5.old/root/usr/lib/systemd/system/ipsec.service.d/50koozali.conf smeserver-libreswan-0.5/root/usr/lib/systemd/system/ipsec.service.d/50koozali.conf
54 --- smeserver-libreswan-0.5.old/root/usr/lib/systemd/system/ipsec.service.d/50koozali.conf 1970-01-01 01:00:00.000000000 +0100
55 +++ smeserver-libreswan-0.5/root/usr/lib/systemd/system/ipsec.service.d/50koozali.conf 2021-03-01 14:31:21.987475630 +0000
56 @@ -0,0 +1,5 @@
57 +[Unit]
58 +After=network.target network.service wan.service
59 +[Install]
60 +WantedBy=sme-server.target
61 +

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