/[smeserver]/rpms/e-smith-base/sme10/e-smith-base-5.8.0-bz10957.sme-server.target.patch
ViewVC logotype

Annotation of /rpms/e-smith-base/sme10/e-smith-base-5.8.0-bz10957.sme-server.target.patch

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


Revision 1.8 - (hide annotations) (download)
Thu Oct 22 20:33:16 2020 UTC (4 years ago) by jpp
Branch: MAIN
Changes since 1.7: +2 -1 lines
* Wed Sep 30 2020 Jean-Philipe Pialasse <tests@pialasse.com> 5.8.0-48.sme
- create e-smith-base-update event [SME: 11012]
- create sme-server.target [SME: 10957]
  make sme-server.target default target
  change default target on  signal-event post-upgrade, post-install, e-smith-base-update
  requires update or smeserver-php and e-smith-runit

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-09-30 15:31:18.288000000 -0400
3     +++ e-smith-base-5.8.0/createlinks 2020-09-30 16:19:33.419000000 -0400
4     @@ -308,6 +308,7 @@
5     templates2events("/etc/smartd.conf", $event);
6     templates2events("/home/e-smith/ssl.pem/pem", $event);
7     event_link("fix-startup", $event, "05");
8     +event_link("systemd-default", $event, "05");
9     event_link("rotate_timestamped_logfiles", $event, "05");
10     event_link("init-accounts", $event, "05");
11     event_link("set-hostname", $event, "10");
12 jpp 1.8 @@ -320,7 +321,9 @@
13 jpp 1.1 event_link("conf-modules", $event, "30");
14     event_link("create-mnt-floppy", $event, "50");
15     event_link("conf-routes", $event, "89");
16     -event_link("reset-unsavedflag", $event, "95")
17     +event_link("systemd-isolate", $event, "94");
18 jpp 1.2 +event_link("reset-unsavedflag", $event, "95");
19 jpp 1.1
20 jpp 1.8 +safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/network");
21 jpp 1.1 safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/wan");
22     safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/dhcpd");
23     @@ -333,6 +335,7 @@
24    
25     templates2events("/etc/smartd.conf", $event);
26     templates2events("/home/e-smith/ssl.pem/pem", $event);
27     +event_link("systemd-default", $event, "05");
28     event_link("set-hostname", $event, "10");
29     event_link("conf-modules", $event, "30");
30     event_link("conf-startup", $event, "60");
31     @@ -349,6 +352,7 @@
32    
33     templates2events("/etc/smartd.conf", $event);
34     templates2events("/home/e-smith/ssl.pem/pem", $event);
35     +event_link("systemd-default", $event, "05");
36     event_link("rmmod-bonding", $event, "10");
37     event_link("set-hostname", $event, "10");
38     event_link("conf-modules", $event, "30");
39     @@ -363,6 +367,7 @@
40    
41     templates2events("/etc/nsswitch.conf", $event);
42     templates2events("/etc/pam.d/system-auth", $event);
43     +event_link("systemd-default", $event, "05");
44     event_link("user-lock-passwd", $event, "15");
45     event_link("user-modify-unix", $event, "15");
46    
47     @@ -396,6 +401,7 @@
48    
49     $event = "halt";
50    
51     +event_link("systemd-default", $event, "05");
52     event_link("halt", $event, "70");
53    
54     #--------------------------------------------------
55     @@ -430,6 +436,7 @@
56     $event = "post-install";
57    
58     event_link("fix-startup", $event, "05");
59     +event_link("systemd-default", $event, "05");
60     event_link("rotate_timestamped_logfiles", $event, "05");
61     event_link("init-accounts", $event, "05");
62     event_link("init-passwords", $event, "10");
63     @@ -444,6 +451,7 @@
64     $event = "post-upgrade";
65    
66     event_link("fix-startup", $event, "05");
67     +event_link("systemd-default", $event, "05");
68     event_link("rotate_timestamped_logfiles", $event, "05");
69     event_link("init-accounts", $event, "05");
70     event_link("conf-startup", $event, "10");
71     @@ -461,6 +469,7 @@
72    
73     $event = "reboot";
74    
75     +event_link("systemd-default", $event, "05");
76     safe_symlink("stop", "root/etc/e-smith/events/$event/services2adjust/wan");
77     event_link("reboot", $event, "99");
78    
79     @@ -632,11 +641,27 @@
80     safe_touch("root/etc/e-smith/templates/etc/pam_ldap.secret/template-begin");
81    
82    
83     -system('mkdir -p root/usr/lib/systemd/system/multi-user.target.wants/');
84     - unlink "root/usr/lib/systemd/system/multi-user.target.wants/bootstrap-console.service";
85     -symlink("/usr/lib/systemd/system/bootstrap-console.service",
86     - "root/usr/lib/systemd/system/multi-user.target.wants/bootstrap-console.service")
87     - or die "Can't symlink to root/usr/lib/systemd/system/multi-user.target.wants/bootstrap-console.service: $!";
88     +foreach my $target (qw(multi-user sme-server))
89     +{
90     +system('mkdir -p root/usr/lib/systemd/system/'.$target.'.target.wants/');
91     + unlink "root/usr/lib/systemd/system/$target.target.wants/bootstrap-console.service";
92     +
93     +foreach my $unit (qw(bootstrap-console.service
94     + dbus.service
95     + getty.target
96     + plymouth-quit.service
97     + plymouth-quit-wait.service
98     + systemd-ask-password-wall.path
99     + systemd-logind.service
100     + systemd-update-utmp-runlevel.service
101     + systemd-user-sessions.service
102     + ))
103     + {
104 jpp 1.4 + symlink("../$unit",
105 jpp 1.1 + "root/usr/lib/systemd/system/$target.target.wants/$unit")
106     + or die "Can't symlink to root/usr/lib/systemd/system/$target.target.wants/$unit: $!";
107     + }
108     +}
109    
110     # languages links
111     foreach (qw(fr-be fr-lu fr-mc fr-ch))
112     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
113     --- e-smith-base-5.8.0.old/root/etc/e-smith/events/actions/systemd-default 1969-12-31 19:00:00.000000000 -0500
114     +++ e-smith-base-5.8.0/root/etc/e-smith/events/actions/systemd-default 2020-09-30 16:14:10.291000000 -0400
115     @@ -0,0 +1,5 @@
116     +#!/usr/bin/bash
117     +/usr/bin/systemctl enable sme-server.target
118     +/usr/bin/systemctl set-default sme-server.target
119     +# /usr/bin/systemctl disable multi-user.target
120     +
121     diff -Nur e-smith-base-5.8.0.old/root/etc/e-smith/events/actions/systemd-isolate e-smith-base-5.8.0/root/etc/e-smith/events/actions/systemd-isolate
122     --- e-smith-base-5.8.0.old/root/etc/e-smith/events/actions/systemd-isolate 1969-12-31 19:00:00.000000000 -0500
123     +++ e-smith-base-5.8.0/root/etc/e-smith/events/actions/systemd-isolate 2020-09-30 16:13:55.794000000 -0400
124 jpp 1.7 @@ -0,0 +1,3 @@
125 jpp 1.1 +#!/usr/bin/bash
126     +/usr/bin/systemctl isolate sme-server.target
127 jpp 1.7 +/usr/bin/systemctl daemon-reload
128 jpp 1.1 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 1969-12-31 19:00:00.000000000 -0500
130     +++ e-smith-base-5.8.0/root/usr/lib/systemd/system/sme-server.target 2020-09-30 15:33:14.457000000 -0400
131 jpp 1.3 @@ -0,0 +1,11 @@
132 jpp 1.1 +# This file is part of Koozali SME Server.
133     +#
134     +
135     +[Unit]
136     +Description=Koozali SME Server System
137     +Documentation=man:systemd.special(7)
138 jpp 1.5 +Requires=basic.target
139 jpp 1.1 +Conflicts=rescue.service rescue.target multi-user.target
140     +After=basic.target rescue.service rescue.target
141     +AllowIsolate=yes
142 jpp 1.2 +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
143 jpp 1.6 diff -Nur e-smith-base-5.8.0.old/root/sbin/e-smith/service e-smith-base-5.8.0/root/sbin/e-smith/service
144     --- e-smith-base-5.8.0.old/root/sbin/e-smith/service 2020-10-01 11:15:37.118000000 -0400
145     +++ e-smith-base-5.8.0/root/sbin/e-smith/service 2020-10-01 11:21:11.608000000 -0400
146     @@ -15,7 +15,7 @@
147     exit
148     fi
149    
150     -if [ "$runlevel" = "multi-user.target" ]
151     +if [ "$runlevel" = "multi-user.target" ] || [ "$runlevel" = "sme-server.target" ]
152     then
153     if ls /etc/rc7.d/S??$1 >/dev/null 2>/dev/null
154     then

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