/[smeserver]/rpms/e-smith-base/sme10/e-smith-base-5.8.0-bz11174-preset.patch
ViewVC logotype

Annotation of /rpms/e-smith-base/sme10/e-smith-base-5.8.0-bz11174-preset.patch

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


Revision 1.2 - (hide annotations) (download)
Sun Nov 15 03:41:13 2020 UTC (3 years, 11 months ago) by jpp
Branch: MAIN
CVS Tags: e-smith-base-5_8_0-71_el7_sme, e-smith-base-5_8_0-67_el7_sme, e-smith-base-5_8_0-64_el7_sme, e-smith-base-5_8_0-69_el7_sme, e-smith-base-5_8_0-70_el7_sme, e-smith-base-5_8_0-60_el7_sme, e-smith-base-5_8_0-65_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-54_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-55_el7_sme, e-smith-base-5_8_0-61_el7_sme, e-smith-base-5_8_0-52_el7_sme, e-smith-base-5_8_0-62_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-63_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-58_el7_sme, e-smith-base-5_8_0-86_el7_sme, e-smith-base-5_8_0-59_el7_sme, e-smith-base-5_8_0-87_el7_sme, e-smith-base-5_8_0-53_el7_sme, e-smith-base-5_8_0-66_el7_sme, e-smith-base-5_8_0-68_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, e-smith-base-5_8_0-51_el7_sme
Changes since 1.1: +7 -7 lines
* Sat Nov 14 2020 Jean-Philipe Pialasse <tests@pialasse.com> 5.8.0-51.sme
- add template for /etc/systemd/system-preset/49koozali.preset  [SME: 11174]
  this will help systemd integration in enabling and disabling services
  remove wan link

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-11-14 22:22:41.104000000 -0500
3     +++ e-smith-base-5.8.0/createlinks 2020-11-14 22:31:36.858000000 -0500
4     @@ -6,6 +6,8 @@
5    
6     templates2events("/etc/selinux/config", qw(post-install post-upgrade e-smith-base-update));
7    
8 jpp 1.2 +templates2events("/etc/systemd/system-preset/49-koozali.preset", qw(post-install post-upgrade e-smith-base-update console-save bootstrap-console-save bootstrap-ldap-save));
9 jpp 1.1 +
10     # give the correct configuration file of dhcpd.conf
11     templates2events("/etc/dhcp/dhcpd.conf", qw(bootstrap-console-save e-smith-base-update));
12    
13 jpp 1.2 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
14     --- e-smith-base-5.8.0.old/root/etc/e-smith/templates/etc/systemd/system-preset/49-koozali.preset/05config 1969-12-31 19:00:00.000000000 -0500
15     +++ e-smith-base-5.8.0/root/etc/e-smith/templates/etc/systemd/system-preset/49-koozali.preset/05config 2020-11-14 22:24:59.983000000 -0500
16 jpp 1.1 @@ -0,0 +1,7 @@
17     +# Koozali SME Server
18     +# auto generated list of services
19     +{
20     +use esmith::ConfigDB;
21     +our $c = esmith::ConfigDB->open_ro || die "Couldn't opeen the configuration database\n";
22     +my $OUT ="";
23     +}
24 jpp 1.2 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
25     --- e-smith-base-5.8.0.old/root/etc/e-smith/templates/etc/systemd/system-preset/49-koozali.preset/20services 1969-12-31 19:00:00.000000000 -0500
26     +++ e-smith-base-5.8.0/root/etc/e-smith/templates/etc/systemd/system-preset/49-koozali.preset/20services 2020-11-14 22:25:31.354000000 -0500
27 jpp 1.1 @@ -0,0 +1,19 @@
28     +{
29     +#list of exception services
30     +#those services might keep some traces in init.d
31     +my @list = qw(bootstrap-console masq mysql.init wan);
32     +
33     +foreach my $service ($c->get_all_by_prop(type => 'service')){
34     + my $status = $service->prop('status') || 'enabled';
35     + my $servicename = $service->prop('SystemdUnit') || $service->key . ".service" || "";
36     + next unless $servicename || $servicename eq ".service";
37     + $status = ($status eq "enabled") ? "enable" : "disable";
38     + unless ( $service->key ~~ @list ) {
39     + $status = "disable" if -e "/etc/rc.d/init.d/".$service->key || -e "/etc/rc.d/init.d/supervise/".$service->key;
40     + }
41     + $OUT .= "# Systemd service file does not exist : " unless -e "/usr/lib/systemd/system/$servicename" || -e "/etc/lib/systemd/system/$servicename";
42     + $OUT .= "$status $servicename\n";
43     +
44     + }
45     +
46     +}

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