/[smecontribs]/rpms/smeserver-BackupPC/contribs10/smeserver-BackupPC-0.2-Update-createlinks-for-systemd-for-SME10.patch
ViewVC logotype

Annotation of /rpms/smeserver-BackupPC/contribs10/smeserver-BackupPC-0.2-Update-createlinks-for-systemd-for-SME10.patch

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


Revision 1.1 - (hide annotations) (download)
Tue Jan 26 12:37:27 2021 UTC (3 years, 9 months ago) by brianr
Branch: MAIN
CVS Tags: smeserver-BackupPC-0_2-8_el7_sme, smeserver-BackupPC-0_2-9_el7_sme, smeserver-BackupPC-0_2-6_el7_sme, smeserver-BackupPC-0_2-7_el7_sme, smeserver-BackupPC-0_2-10_el7_sme, smeserver-BackupPC-0_2-15_el7_sme, smeserver-BackupPC-0_2-13_el7_sme, smeserver-BackupPC-0_2-14_el7_sme, smeserver-BackupPC-0_2-11_el7_sme, smeserver-BackupPC-0_2-12_el7_sme, HEAD
* Mon Jan 11 2021 Brian Read <brianr@bjsystems.co.uk> 0.2-6.sme
- Update createlinks for systemd according to [SME: 10959][SME: 11055]

1 brianr 1.1 diff -urN smeserver-BackupPC-0.2.old/createlinks smeserver-BackupPC-0.2/createlinks
2     --- smeserver-BackupPC-0.2.old/createlinks 2013-11-12 18:07:16.000000000 +0000
3     +++ smeserver-BackupPC-0.2/createlinks 2021-01-26 11:58:07.025890602 +0000
4     @@ -2,20 +2,20 @@
5    
6     use esmith::Build::CreateLinks qw(:all);
7    
8     -# Start and stop links
9     +# Start and stop links - SME9
10    
11     -service_link_enhanced("backuppc", "S98", "7");
12     -service_link_enhanced("backuppc", "K10", "6");
13     -service_link_enhanced("backuppc", "K10", "0");
14     -service_link_enhanced("backuppc", "K10", "1");
15     -
16     -service_link_enhanced("httpd-bkpc", "S86", "7");
17     -service_link_enhanced("httpd-bkpc", "K15", "6");
18     -service_link_enhanced("httpd-bkpc", "K15", "0");
19     -service_link_enhanced("httpd-bkpc", "K15", "1");
20     +#service_link_enhanced("backuppc", "S98", "7");
21     +#service_link_enhanced("backuppc", "K10", "6");
22     +#service_link_enhanced("backuppc", "K10", "0");
23     +#service_link_enhanced("backuppc", "K10", "1");
24     +
25     +#service_link_enhanced("httpd-bkpc", "S86", "7");
26     +#service_link_enhanced("httpd-bkpc", "K15", "6");
27     +#service_link_enhanced("httpd-bkpc", "K15", "0");
28     +#service_link_enhanced("httpd-bkpc", "K15", "1");
29    
30     -safe_symlink("../daemontools" , 'root/etc/rc.d/init.d/supervise/httpd-bkpc');
31     -safe_symlink("/var/service/httpd-bkpc" , 'root/service/httpd-bkpc');
32     +#safe_symlink("../daemontools" , 'root/etc/rc.d/init.d/supervise/httpd-bkpc');
33     +#safe_symlink("/var/service/httpd-bkpc" , 'root/service/httpd-bkpc');
34    
35     # Panel links
36    
37     @@ -26,23 +26,32 @@
38    
39     # Event symlinks
40    
41     -my $event = 'backuppc-update';
42     -templates2events("/etc/httpd/conf/httpd.conf", $event);
43     -templates2events("/etc/sudoers", $event);
44     -templates2events("/etc/httpd/bkpc-conf/httpd.conf", qw(backuppc-update bootstrap-console-save));
45     -
46     -event_link("backuppc-checkupgrade", $event, "20");
47     -event_link("backuppc-genkey", $event, "10");
48     -event_link("backuppc-checkupgrade", "post-upgrade", "91");
49     -event_link("backuppc-genkey", "post-upgrade", "90");
50     -
51     -safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/backuppc");
52     -safe_symlink("sigusr1", "root/etc/e-smith/events/$event/services2adjust/httpd-e-smith");
53     -safe_symlink("sigusr1", "root/etc/e-smith/events/$event/services2adjust/httpd-bkpc");
54     -safe_symlink("sigusr1", "root/etc/e-smith/events/logrotate/services2adjust/httpd-bkpc");
55     +# our event specific for updating with yum without reboot
56     +$event = 'smeserver-BackupPC-update'; #Must match rpm name
57     + foreach my $file (qw(/etc/systemd/system-preset/49-koozali.preset
58     + /etc/httpd/conf/httpd.conf
59     + /etc/sudoers
60     + /etc/httpd/bkpc-conf/httpd.conf
61     + ))
62     + {
63     + templates2events( $file, $event );
64     + }
65     +#action needed in case we have a systemd unit
66     + event_link("systemd-default", $event, "10");
67     + event_link("systemd-reload", $event, "50");
68     +#action specific to this package
69     + event_link("backuppc-checkupgrade", $event, "20");
70     + event_link("backuppc-genkey", $event, "10");
71     + event_link("backuppc-checkupgrade", "post-upgrade", "91");
72     + event_link("backuppc-genkey", "post-upgrade", "90");
73     +#services we need to restart
74     + #safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/backuppc");
75     + safe_symlink("sigusr1", "root/etc/e-smith/events/$event/services2adjust/httpd-e-smith");
76     + safe_symlink("sigusr1", "root/etc/e-smith/events/$event/services2adjust/httpd-bkpc");
77     + safe_symlink("sigusr1", "root/etc/e-smith/events/logrotate/services2adjust/httpd-bkpc");
78    
79     # Create needed empty files
80     -safe_touch("root/etc/e-smith/events/logrotate/logfiles2timestamp/var/log/httpd/bkpc_access_log");
81     -safe_touch("root/etc/e-smith/events/logrotate/logfiles2timestamp/var/log/httpd/bkpc_error_log");
82     -safe_touch("root/var/service/httpd-bkpc/down");
83     + safe_touch("root/etc/e-smith/events/logrotate/logfiles2timestamp/var/log/httpd/bkpc_access_log");
84     + safe_touch("root/etc/e-smith/events/logrotate/logfiles2timestamp/var/log/httpd/bkpc_error_log");
85     + safe_touch("root/var/service/httpd-bkpc/down");
86    
87     diff -urN smeserver-BackupPC-0.2.old/createlinks.sav smeserver-BackupPC-0.2/createlinks.sav
88     --- smeserver-BackupPC-0.2.old/createlinks.sav 1970-01-01 01:00:00.000000000 +0100
89     +++ smeserver-BackupPC-0.2/createlinks.sav 2013-11-12 18:07:16.000000000 +0000
90     @@ -0,0 +1,48 @@
91     +#!/usr/bin/perl -w
92     +
93     +use esmith::Build::CreateLinks qw(:all);
94     +
95     +# Start and stop links
96     +
97     +service_link_enhanced("backuppc", "S98", "7");
98     +service_link_enhanced("backuppc", "K10", "6");
99     +service_link_enhanced("backuppc", "K10", "0");
100     +service_link_enhanced("backuppc", "K10", "1");
101     +
102     +service_link_enhanced("httpd-bkpc", "S86", "7");
103     +service_link_enhanced("httpd-bkpc", "K15", "6");
104     +service_link_enhanced("httpd-bkpc", "K15", "0");
105     +service_link_enhanced("httpd-bkpc", "K15", "1");
106     +
107     +safe_symlink("../daemontools" , 'root/etc/rc.d/init.d/supervise/httpd-bkpc');
108     +safe_symlink("/var/service/httpd-bkpc" , 'root/service/httpd-bkpc');
109     +
110     +# Panel links
111     +
112     +panel_link("backuppc", 'manager');
113     +
114     +# Various symlinks
115     +
116     +
117     +# Event symlinks
118     +
119     +my $event = 'backuppc-update';
120     +templates2events("/etc/httpd/conf/httpd.conf", $event);
121     +templates2events("/etc/sudoers", $event);
122     +templates2events("/etc/httpd/bkpc-conf/httpd.conf", qw(backuppc-update bootstrap-console-save));
123     +
124     +event_link("backuppc-checkupgrade", $event, "20");
125     +event_link("backuppc-genkey", $event, "10");
126     +event_link("backuppc-checkupgrade", "post-upgrade", "91");
127     +event_link("backuppc-genkey", "post-upgrade", "90");
128     +
129     +safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/backuppc");
130     +safe_symlink("sigusr1", "root/etc/e-smith/events/$event/services2adjust/httpd-e-smith");
131     +safe_symlink("sigusr1", "root/etc/e-smith/events/$event/services2adjust/httpd-bkpc");
132     +safe_symlink("sigusr1", "root/etc/e-smith/events/logrotate/services2adjust/httpd-bkpc");
133     +
134     +# Create needed empty files
135     +safe_touch("root/etc/e-smith/events/logrotate/logfiles2timestamp/var/log/httpd/bkpc_access_log");
136     +safe_touch("root/etc/e-smith/events/logrotate/logfiles2timestamp/var/log/httpd/bkpc_error_log");
137     +safe_touch("root/var/service/httpd-bkpc/down");
138     +

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