/[smeserver]/rpms/e-smith-base/sme10/e-smith-base-5.8.0-bz11247-wants.patch
ViewVC logotype

Annotation of /rpms/e-smith-base/sme10/e-smith-base-5.8.0-bz11247-wants.patch

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


Revision 1.2 - (hide annotations) (download)
Fri Dec 25 21:30:22 2020 UTC (3 years, 10 months ago) by jpp
Branch: MAIN
CVS Tags: e-smith-base-5_8_0-71_el7_sme, e-smith-base-5_8_0-83_el7_sme, e-smith-base-5_8_0-96_el7_sme, e-smith-base-5_8_0-95_el7_sme, e-smith-base-5_8_0-80_el7_sme, e-smith-base-5_8_0-85_el7_sme, e-smith-base-5_8_0-81_el7_sme, e-smith-base-5_8_0-82_el7_sme, e-smith-base-5_8_0-88_el7_sme, e-smith-base-5_8_0-99_el7_sme, e-smith-base-5_8_0-94_el7_sme, e-smith-base-5_8_0-98_el7_sme, e-smith-base-5_8_0-97_el7_sme, e-smith-base-5_8_0-92_el7_sme, e-smith-base-5_8_0-75_el7_sme, e-smith-base-5_8_0-78_el7_sme, e-smith-base-5_8_0-90_el7_sme, e-smith-base-5_8_0-93_el7_sme, e-smith-base-5_8_0-74_el7_sme, e-smith-base-5_8_0-77_el7_sme, e-smith-base-5_8_0-73_el7_sme, e-smith-base-5_8_0-76_el7_sme, e-smith-base-5_8_0-79_el7_sme, e-smith-base-5_8_0-91_el7_sme, e-smith-base-5_8_0-86_el7_sme, e-smith-base-5_8_0-87_el7_sme, e-smith-base-5_8_0-72_el7_sme, e-smith-base-5_8_0-84_el7_sme, e-smith-base-5_8_0-89_el7_sme
Changes since 1.1: +1 -1 lines
* Fri Dec 25 2020 Jean-Philipe Pialasse <tests@pialasse.com> 5.8.0-71.sme
- fix services starting when they are in Wants= for sme-server.target and preset disabled [SME: 11247]

1 jpp 1.1 diff -Nur e-smith-base-5.8.0.old/createlinks e-smith-base-5.8.0/createlinks
2     --- e-smith-base-5.8.0.old/createlinks 2020-12-25 14:41:47.326000000 -0500
3     +++ e-smith-base-5.8.0/createlinks 2020-12-25 14:53:04.312000000 -0500
4     @@ -674,3 +674,7 @@
5     safe_symlink("sv", "root/etc/e-smith/locale/$_");
6     }
7     safe_symlink("zh-tw", "root/etc/e-smith/locale/zh-hk");
8     +
9     +
10     +# sme-server.target.d links
11     +safe_symlink("/etc/e-smith/templates/etc/systemd/system-preset/49-koozali.preset/05config", "root/etc/e-smith/templates/usr/lib/systemd/system/sme-server.target.d/50koozali.conf/05config");
12     diff -Nur e-smith-base-5.8.0.old/root/etc/e-smith/events/actions/systemd-default e-smith-base-5.8.0/root/etc/e-smith/events/actions/systemd-default
13     --- e-smith-base-5.8.0.old/root/etc/e-smith/events/actions/systemd-default 2020-12-25 14:41:47.319000000 -0500
14     +++ e-smith-base-5.8.0/root/etc/e-smith/events/actions/systemd-default 2020-12-25 15:17:35.667000000 -0500
15     @@ -17,6 +17,7 @@
16     my @servicedirpaths = ("/usr/lib/systemd/system/","/etc/systemd/system/");
17     my @presetdirpaths = ("/usr/lib/systemd/system-preset/","/etc/systemd/system-preset/");
18     my $filename = "/etc/systemd/system-preset/49-koozali.preset";
19     +my $filename2 = "/usr/lib/systemd/system/sme-server.target.d/50koozali.conf";
20     my %services;
21     my %files;
22     my @WantedBy;
23     @@ -45,12 +46,17 @@
24     system("/usr/bin/systemctl set-default sme-server.target");
25    
26    
27     -#warn "expanding $filename\n";
28     esmith::templates::processTemplate({
29     MORE_DATA => { },
30     TEMPLATE_PATH => $filename,
31     OUTPUT_FILENAME => $filename,
32     });
33     +esmith::templates::processTemplate({
34     + MORE_DATA => { },
35     + TEMPLATE_PATH => $filename2,
36     + OUTPUT_FILENAME => $filename2,
37     + });
38     +
39    
40     # list both preset directories
41     # seek files to be removed from usr/lib if same basename exist
42     diff -Nur e-smith-base-5.8.0.old/root/etc/e-smith/templates/etc/systemd/system-preset/49-koozali.preset/05config e-smith-base-5.8.0/root/etc/e-smith/templates/etc/systemd/system-preset/49-koozali.preset/05config
43     --- e-smith-base-5.8.0.old/root/etc/e-smith/templates/etc/systemd/system-preset/49-koozali.preset/05config 2020-12-25 14:41:47.246000000 -0500
44     +++ e-smith-base-5.8.0/root/etc/e-smith/templates/etc/systemd/system-preset/49-koozali.preset/05config 2020-12-25 14:44:02.798000000 -0500
45     @@ -2,6 +2,11 @@
46     # auto generated list of services
47     {
48     use esmith::ConfigDB;
49     -our $c = esmith::ConfigDB->open_ro || die "Couldn't opeen the configuration database\n";
50     +our $c = esmith::ConfigDB->open_ro || die "Couldn't open the configuration database\n";
51     +
52     +#list of exception services
53     +#those services might keep some traces in init.d
54     +our @list = qw(bootstrap-console masq mysql.init wan lpd clamd diald ldap.init);
55     +
56     my $OUT ="";
57     }
58     diff -Nur e-smith-base-5.8.0.old/root/etc/e-smith/templates/etc/systemd/system-preset/49-koozali.preset/20services e-smith-base-5.8.0/root/etc/e-smith/templates/etc/systemd/system-preset/49-koozali.preset/20services
59     --- e-smith-base-5.8.0.old/root/etc/e-smith/templates/etc/systemd/system-preset/49-koozali.preset/20services 2020-12-25 14:41:47.281000000 -0500
60     +++ e-smith-base-5.8.0/root/etc/e-smith/templates/etc/systemd/system-preset/49-koozali.preset/20services 2020-12-25 14:44:34.621000000 -0500
61     @@ -1,7 +1,4 @@
62     {
63     -#list of exception services
64     -#those services might keep some traces in init.d
65     -my @list = qw(bootstrap-console masq mysql.init wan lpd clamd diald ldap.init);
66    
67     foreach my $service ($c->get_all_by_prop(type => 'service')){
68     my $status = $service->prop('status') || 'enabled';
69     diff -Nur e-smith-base-5.8.0.old/root/etc/e-smith/templates/usr/lib/systemd/system/sme-server.target.d/50koozali.conf/20services e-smith-base-5.8.0/root/etc/e-smith/templates/usr/lib/systemd/system/sme-server.target.d/50koozali.conf/20services
70     --- e-smith-base-5.8.0.old/root/etc/e-smith/templates/usr/lib/systemd/system/sme-server.target.d/50koozali.conf/20services 1969-12-31 19:00:00.000000000 -0500
71     +++ e-smith-base-5.8.0/root/etc/e-smith/templates/usr/lib/systemd/system/sme-server.target.d/50koozali.conf/20services 2020-12-25 15:03:40.085000000 -0500
72     @@ -0,0 +1,20 @@
73     +[Unit]
74     +Wants={
75     +
76     +foreach my $service ($c->get_all_by_prop(type => 'service')){
77     + my $status = $service->prop('status') || 'enabled';
78     + my $servicename = $service->prop('SystemdUnit') || $service->key . ".service" || "";
79     + next unless $servicename || $servicename eq ".service";
80     + $status = ($status eq "enabled") ? "enable" : "disable";
81     + unless ( $service->key ~~ @list ) {
82     + $status = "disable" if -e "/etc/rc.d/init.d/".$service->key || -e "/etc/rc.d/init.d/supervise/".$service->key;
83     + }
84     + next unless -e "/usr/lib/systemd/system/$servicename" || -e "/etc/lib/systemd/system/$servicename";
85     + # we could also filter out there services that have already WantedBy=.*sme-server.target in their unit file or in a drop-in
86     +
87 jpp 1.2 + $OUT .= "$servicename " if ($status eq "enable");
88 jpp 1.1 +
89     + }
90     +
91     +}
92     +
93     diff -Nur e-smith-base-5.8.0.old/root/usr/lib/systemd/system/acpid.service.d/51koozali.conf e-smith-base-5.8.0/root/usr/lib/systemd/system/acpid.service.d/51koozali.conf
94     --- e-smith-base-5.8.0.old/root/usr/lib/systemd/system/acpid.service.d/51koozali.conf 1969-12-31 19:00:00.000000000 -0500
95     +++ e-smith-base-5.8.0/root/usr/lib/systemd/system/acpid.service.d/51koozali.conf 2020-12-25 15:11:50.785000000 -0500
96     @@ -0,0 +1,3 @@
97     +[Install]
98     +WantedBy=sme-server.target
99     +
100     diff -Nur e-smith-base-5.8.0.old/root/usr/lib/systemd/system/crond.service.d/51koozali.conf e-smith-base-5.8.0/root/usr/lib/systemd/system/crond.service.d/51koozali.conf
101     --- e-smith-base-5.8.0.old/root/usr/lib/systemd/system/crond.service.d/51koozali.conf 1969-12-31 19:00:00.000000000 -0500
102     +++ e-smith-base-5.8.0/root/usr/lib/systemd/system/crond.service.d/51koozali.conf 2020-12-25 15:12:08.535000000 -0500
103     @@ -0,0 +1,3 @@
104     +[Install]
105     +WantedBy=sme-server.target
106     +
107     diff -Nur e-smith-base-5.8.0.old/root/usr/lib/systemd/system/irqbalance.service.d/51koozali.conf e-smith-base-5.8.0/root/usr/lib/systemd/system/irqbalance.service.d/51koozali.conf
108     --- e-smith-base-5.8.0.old/root/usr/lib/systemd/system/irqbalance.service.d/51koozali.conf 1969-12-31 19:00:00.000000000 -0500
109     +++ e-smith-base-5.8.0/root/usr/lib/systemd/system/irqbalance.service.d/51koozali.conf 2020-12-25 15:12:37.139000000 -0500
110     @@ -0,0 +1,3 @@
111     +[Install]
112     +WantedBy=sme-server.target
113     +
114     diff -Nur e-smith-base-5.8.0.old/root/usr/lib/systemd/system/rsyslog.service.d/51koozali.conf e-smith-base-5.8.0/root/usr/lib/systemd/system/rsyslog.service.d/51koozali.conf
115     --- e-smith-base-5.8.0.old/root/usr/lib/systemd/system/rsyslog.service.d/51koozali.conf 1969-12-31 19:00:00.000000000 -0500
116     +++ e-smith-base-5.8.0/root/usr/lib/systemd/system/rsyslog.service.d/51koozali.conf 2020-12-25 15:13:12.581000000 -0500
117     @@ -0,0 +1,3 @@
118     +[Install]
119     +WantedBy=sme-server.target
120     +
121     diff -Nur e-smith-base-5.8.0.old/root/usr/lib/systemd/system/smartd.service.d/51koozali.conf e-smith-base-5.8.0/root/usr/lib/systemd/system/smartd.service.d/51koozali.conf
122     --- e-smith-base-5.8.0.old/root/usr/lib/systemd/system/smartd.service.d/51koozali.conf 1969-12-31 19:00:00.000000000 -0500
123     +++ e-smith-base-5.8.0/root/usr/lib/systemd/system/smartd.service.d/51koozali.conf 2020-12-25 15:13:37.764000000 -0500
124     @@ -0,0 +1,3 @@
125     +[Install]
126     +WantedBy=sme-server.target
127     +
128     diff -Nur e-smith-base-5.8.0.old/root/usr/lib/systemd/system/sme-server.target e-smith-base-5.8.0/root/usr/lib/systemd/system/sme-server.target
129     --- e-smith-base-5.8.0.old/root/usr/lib/systemd/system/sme-server.target 2020-12-25 14:41:47.318000000 -0500
130     +++ e-smith-base-5.8.0/root/usr/lib/systemd/system/sme-server.target 2020-12-25 15:06:06.683000000 -0500
131     @@ -6,11 +6,8 @@
132     Documentation=man:systemd.special(7)
133     Requires=basic.target
134     Conflicts=rescue.service rescue.target multi-user.target
135     -After=basic.target rescue.service rescue.target
136     +After=basic.target rescue.service rescue.target runit.service
137     AllowIsolate=yes
138     -Wants=acpid.service atd.service auditd.service avahi-daemon.service brandbot.path crond.service irqbalance.service nfs-client.target remote-fs.target rhel-configure.service rsyslog.service smartd.service yum-cron.service
139     +Wants=atd.service auditd.service avahi-daemon.service brandbot.path nfs-client.target remote-fs.target rhel-configure.service
140     Wants=dbus.service plymouth-quit-wait.service plymouth-quit.service systemd-logind.service systemd-update-utmp-runlevel.service systemd-user-sessions.service
141     -Wants=php-fpm.service php55-php-fpm.service php56-php-fpm.service php70-php-fpm.service php71-php-fpm.service php72-php-fpm.service php73-php-fpm.service php74-php-fpm.service
142     -Wants=runit.service bootstrap-console.service wan.service networking.service masq.service tinydns.service qpsmtpd.service sqpsmtpd.service qmail.service ftp.service dnscache.service dnscache.forwarder.service lpd.service dhcpd.service dovecot.service mariadb.service ntpd.service nut.service clamd.service freshclam.service httpd-admin.service httpd-e-smith.service ldap.service ldap.init.service local.service mysql.init.service spamd.service
143     -
144    

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