/[smeserver]/rpms/e-smith-nutUPS/sme10/e-smith-nutUPS-2.6.0-bz9423-bz11146.patch
ViewVC logotype

Contents of /rpms/e-smith-nutUPS/sme10/e-smith-nutUPS-2.6.0-bz9423-bz11146.patch

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


Revision 1.7 - (show annotations) (download)
Mon Dec 7 17:36:16 2020 UTC (3 years, 11 months ago) by jpp
Branch: MAIN
CVS Tags: e-smith-nutUPS-2_6_0-9_el7_sme, e-smith-nutUPS-2_6_0-8_el7_sme, e-smith-nutUPS-2_6_0-12_el7_sme, e-smith-nutUPS-2_6_0-10_el7_sme, e-smith-nutUPS-2_6_0-13_el7_sme, e-smith-nutUPS-2_6_0-11_el7_sme, HEAD
Changes since 1.6: +3 -3 lines
* Mon Dec 07 2020 Jean-Philipe Pialasse <tests@pialasse.com> 2.6.0-8.sme
- fix template path for monitor [SME: 9423]

1 diff -Nur e-smith-nutUPS-2.6.0.old/createlinks e-smith-nutUPS-2.6.0/createlinks
2 --- e-smith-nutUPS-2.6.0.old/createlinks 2008-10-07 13:36:30.000000000 -0400
3 +++ e-smith-nutUPS-2.6.0/createlinks 2020-11-18 17:03:35.873000000 -0500
4 @@ -2,16 +2,23 @@
5
6 use esmith::Build::CreateLinks qw(:all);
7
8 -my @events = qw(bootstrap-console-save console-save post-install post-upgrade);
9 +my @events = qw(bootstrap-console-save console-save post-install post-upgrade e-smith-nutUPS-update);
10
11 templates2events("/etc/sysconfig/ups", @events);
12 +templates2events("/usr/lib/systemd/system/nut-server.service.d/50koozali.conf", @events);
13 +templates2events("/usr/lib/systemd/system/nut-monitor.service.d/50koozali.conf", @events);
14
15 foreach (qw(ups.conf upsd.users upsmon.conf upssched.conf))
16 {
17 templates2events("/etc/ups/$_", @events);
18 }
19
20 -foreach (qw(bootstrap-console-save console-save))
21 +foreach (qw(bootstrap-console-save console-save e-smith-nutUPS-update))
22 {
23 templates2events("/etc/ups/upsd.conf", $_);
24 }
25 +
26 +my $event="e-smith-nutUPS-update";
27 +safe_symlink("try-restart", "root/etc/e-smith/events/$event/services2adjust/nut");
28 +templates2events("/etc/systemd/system-preset/49-koozali.preset", $event);
29 +event_link("systemd-default", $event, "06");
30 diff -Nur e-smith-nutUPS-2.6.0.old/root/etc/e-smith/templates/etc/systemd/system-preset/49-koozali.preset/70nutUPS e-smith-nutUPS-2.6.0/root/etc/e-smith/templates/etc/systemd/system-preset/49-koozali.preset/70nutUPS
31 --- e-smith-nutUPS-2.6.0.old/root/etc/e-smith/templates/etc/systemd/system-preset/49-koozali.preset/70nutUPS 1969-12-31 19:00:00.000000000 -0500
32 +++ e-smith-nutUPS-2.6.0/root/etc/e-smith/templates/etc/systemd/system-preset/49-koozali.preset/70nutUPS 2020-11-18 16:55:27.146000000 -0500
33 @@ -0,0 +1,16 @@
34 +# nut UPS specific subservices
35 +{
36 +$nutstatus = $nut{status} || 'disabled';
37 +$master = $nut{Master} || 'yes';
38 +
39 +if ($nutstatus eq 'enabled') {
40 + $OUT .= "enable nut-server.service\n" if ($master eq 'yes');
41 + $OUT .= "disable nut-server.service\n" unless ($master eq 'yes');
42 + $OUT .= "enable nut-monitor.service\n";
43 + }
44 +else
45 + {
46 + $OUT .= "disable nut-server.service\n";
47 + $OUT .= "disable nut-monitor.service\n";
48 + }
49 +}
50 diff -Nur e-smith-nutUPS-2.6.0.old/root/etc/e-smith/templates/usr/lib/systemd/system/nut-monitor.service.d/50koozali.conf/20unit e-smith-nutUPS-2.6.0/root/etc/e-smith/templates/usr/lib/systemd/system/nut-monitor.service.d/50koozali.conf/20unit
51 --- e-smith-nutUPS-2.6.0.old/root/etc/e-smith/templates/usr/lib/systemd/system/nut-monitor.service.d/50koozali.conf/20unit 1969-12-31 19:00:00.000000000 -0500
52 +++ e-smith-nutUPS-2.6.0/root/etc/e-smith/templates/usr/lib/systemd/system/nut-monitor.service.d/50koozali.conf/20unit 2020-11-18 16:59:54.550000000 -0500
53 @@ -0,0 +1,3 @@
54 +[Unit]
55 +PartOf=nut.service
56 +After=nut.service
57 diff -Nur e-smith-nutUPS-2.6.0.old/root/etc/e-smith/templates/usr/lib/systemd/system/nut-monitor.service.d/50koozali.conf/40service e-smith-nutUPS-2.6.0/root/etc/e-smith/templates/usr/lib/systemd/system/nut-monitor.service.d/50koozali.conf/40service
58 --- e-smith-nutUPS-2.6.0.old/root/etc/e-smith/templates/usr/lib/systemd/system/nut-monitor.service.d/50koozali.conf/40service 1969-12-31 19:00:00.000000000 -0500
59 +++ e-smith-nutUPS-2.6.0/root/etc/e-smith/templates/usr/lib/systemd/system/nut-monitor.service.d/50koozali.conf/40service 2020-11-18 16:59:11.957000000 -0500
60 @@ -0,0 +1,2 @@
61 +[Service]
62 +ExecStartPre=/sbin/e-smith/service-status nut
63 diff -Nur e-smith-nutUPS-2.6.0.old/root/etc/e-smith/templates/usr/lib/systemd/system/nut-monitor.service.d/50koozali.conf/80install e-smith-nutUPS-2.6.0/root/etc/e-smith/templates/usr/lib/systemd/system/nut-monitor.service.d/50koozali.conf/80install
64 --- e-smith-nutUPS-2.6.0.old/root/etc/e-smith/templates/usr/lib/systemd/system/nut-monitor.service.d/50koozali.conf/80install 1969-12-31 19:00:00.000000000 -0500
65 +++ e-smith-nutUPS-2.6.0/root/etc/e-smith/templates/usr/lib/systemd/system/nut-monitor.service.d/50koozali.conf/80install 2020-11-18 16:59:11.957000000 -0500
66 @@ -0,0 +1,2 @@
67 +[Install]
68 +WantedBy=sme-server.target
69 diff -Nur e-smith-nutUPS-2.6.0.old/root/etc/e-smith/templates/usr/lib/systemd/system/nut-server.service.d/50koozali.conf/20unit e-smith-nutUPS-2.6.0/root/etc/e-smith/templates/usr/lib/systemd/system/nut-server.service.d/50koozali.conf/20unit
70 --- e-smith-nutUPS-2.6.0.old/root/etc/e-smith/templates/usr/lib/systemd/system/nut-server.service.d/50koozali.conf/20unit 1969-12-31 19:00:00.000000000 -0500
71 +++ e-smith-nutUPS-2.6.0/root/etc/e-smith/templates/usr/lib/systemd/system/nut-server.service.d/50koozali.conf/20unit 2020-11-18 16:40:01.717000000 -0500
72 @@ -0,0 +1,4 @@
73 +[Unit]
74 +PartOf=nut.service
75 +After=nut.service
76 +
77 diff -Nur e-smith-nutUPS-2.6.0.old/root/etc/e-smith/templates/usr/lib/systemd/system/nut-server.service.d/50koozali.conf/40service e-smith-nutUPS-2.6.0/root/etc/e-smith/templates/usr/lib/systemd/system/nut-server.service.d/50koozali.conf/40service
78 --- e-smith-nutUPS-2.6.0.old/root/etc/e-smith/templates/usr/lib/systemd/system/nut-server.service.d/50koozali.conf/40service 1969-12-31 19:00:00.000000000 -0500
79 +++ e-smith-nutUPS-2.6.0/root/etc/e-smith/templates/usr/lib/systemd/system/nut-server.service.d/50koozali.conf/40service 2020-11-18 16:58:26.162000000 -0500
80 @@ -0,0 +1,2 @@
81 +[Service]
82 +ExecStartPre=/sbin/e-smith/service-status nut
83 diff -Nur e-smith-nutUPS-2.6.0.old/root/etc/e-smith/templates/usr/lib/systemd/system/nut-server.service.d/50koozali.conf/80install e-smith-nutUPS-2.6.0/root/etc/e-smith/templates/usr/lib/systemd/system/nut-server.service.d/50koozali.conf/80install
84 --- e-smith-nutUPS-2.6.0.old/root/etc/e-smith/templates/usr/lib/systemd/system/nut-server.service.d/50koozali.conf/80install 1969-12-31 19:00:00.000000000 -0500
85 +++ e-smith-nutUPS-2.6.0/root/etc/e-smith/templates/usr/lib/systemd/system/nut-server.service.d/50koozali.conf/80install 2020-11-18 16:56:58.493000000 -0500
86 @@ -0,0 +1,2 @@
87 +[Install]
88 +WantedBy=sme-server.target
89 diff -Nur e-smith-nutUPS-2.6.0.old/root/usr/lib/systemd/system/nut.service e-smith-nutUPS-2.6.0/root/usr/lib/systemd/system/nut.service
90 --- e-smith-nutUPS-2.6.0.old/root/usr/lib/systemd/system/nut.service 1969-12-31 19:00:00.000000000 -0500
91 +++ e-smith-nutUPS-2.6.0/root/usr/lib/systemd/system/nut.service 2020-11-18 16:29:41.392000000 -0500
92 @@ -0,0 +1,22 @@
93 +[Unit]
94 +Description=Network UPS Tools - Master service for Koozali SME Srrver
95 +After=local-fs.target network.target nut-server.service
96 +
97 +[Service]
98 +ExecStartPre=/sbin/e-smith/service-status nut
99 +ExecStartPre=-/sbin/e-smith/expand-template /etc/sysconfig/ups
100 +ExecStartPre=-/sbin/e-smith/expand-template /etc/ups/ups.conf
101 +ExecStartPre=-/etc/ups/upsd.conf
102 +ExecStartPre=-/etc/ups/upsd.users
103 +ExecStartPre=-/etc/ups/upsmon.conf
104 +ExecStartPre=-/etc/ups/upssched.conf
105 +
106 +# The dummy program will exit
107 +Type=oneshot
108 +# Execute a dummy program
109 +ExecStart=/bin/true
110 +# This service shall be considered active after start
111 +RemainAfterExit=yes
112 +
113 +[Install]
114 +WantedBy=multi-user.target sme-server.target

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